var hx=Object.defineProperty;var mh=n=>{throw TypeError(n)};var mx=(n,t,s)=>t in n?hx(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var Ie=(n,t,s)=>mx(n,typeof t!="symbol"?t+"":t,s),qu=(n,t,s)=>t.has(n)||mh("Cannot "+s);var R=(n,t,s)=>(qu(n,t,"read from private field"),s?s.call(n):t.get(n)),he=(n,t,s)=>t.has(n)?mh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,s),ee=(n,t,s,i)=>(qu(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s),Pe=(n,t,s)=>(qu(n,t,"access private method"),s);var ba=(n,t,s,i)=>({set _(a){ee(n,t,a,s)},get _(){return R(n,t,i)}});function gx(n,t){for(var s=0;si[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Kc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Wu={exports:{}},Ii={},Hu={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var gh;function yx(){if(gh)return Ce;gh=1;var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=x&&P[x]||P["@@iterator"],typeof P=="function"?P:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,k={};function w(P,U,ce){this.props=P,this.context=U,this.refs=k,this.updater=ce||j}w.prototype.isReactComponent={},w.prototype.setState=function(P,U){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,U,"setState")},w.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=w.prototype;function L(P,U,ce){this.props=P,this.context=U,this.refs=k,this.updater=ce||j}var N=L.prototype=new E;N.constructor=L,M(N,w.prototype),N.isPureReactComponent=!0;var A=Array.isArray,$=Object.prototype.hasOwnProperty,V={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function z(P,U,ce){var me,pe={},X=null,ve=null;if(U!=null)for(me in U.ref!==void 0&&(ve=U.ref),U.key!==void 0&&(X=""+U.key),U)$.call(U,me)&&!G.hasOwnProperty(me)&&(pe[me]=U[me]);var Ne=arguments.length-2;if(Ne===1)pe.children=ce;else if(1>>1,U=K[P];if(0>>1;Pa(pe,B))Xa(ve,pe)?(K[P]=ve,K[X]=B,P=X):(K[P]=pe,K[me]=B,P=me);else if(Xa(ve,B))K[P]=ve,K[X]=B,P=X;else break e}}return ae}function a(K,ae){var B=K.sortIndex-ae.sortIndex;return B!==0?B:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var h=[],g=[],v=1,x=null,_=3,j=!1,M=!1,k=!1,w=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(K){for(var ae=s(g);ae!==null;){if(ae.callback===null)i(g);else if(ae.startTime<=K)i(g),ae.sortIndex=ae.expirationTime,t(h,ae);else break;ae=s(g)}}function A(K){if(k=!1,N(K),!M)if(s(h)!==null)M=!0,Ee($);else{var ae=s(g);ae!==null&&_e(A,ae.startTime-K)}}function $(K,ae){M=!1,k&&(k=!1,E(z),z=-1),j=!0;var B=_;try{for(N(ae),x=s(h);x!==null&&(!(x.expirationTime>ae)||K&&!be());){var P=x.callback;if(typeof P=="function"){x.callback=null,_=x.priorityLevel;var U=P(x.expirationTime<=ae);ae=n.unstable_now(),typeof U=="function"?x.callback=U:x===s(h)&&i(h),N(ae)}else i(h);x=s(h)}if(x!==null)var ce=!0;else{var me=s(g);me!==null&&_e(A,me.startTime-ae),ce=!1}return ce}finally{x=null,_=B,j=!1}}var V=!1,G=null,z=-1,oe=5,ue=-1;function be(){return!(n.unstable_now()-ueK||125P?(K.sortIndex=B,t(g,K),s(h)===null&&K===s(g)&&(k?(E(z),z=-1):k=!0,_e(A,B-P))):(K.sortIndex=U,t(h,K),M||j||(M=!0,Ee($))),K},n.unstable_shouldYield=be,n.unstable_wrapCallback=function(K){var ae=_;return function(){var B=_;_=ae;try{return K.apply(this,arguments)}finally{_=B}}}})(Gu)),Gu}var bh;function bx(){return bh||(bh=1,Ku.exports=wx()),Ku.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Eh;function Ex(){if(Eh)return Tt;Eh=1;var n=Gc(),t=bx();function s(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},x={};function _(e){return h.call(x,e)?!0:h.call(v,e)?!1:g.test(e)?x[e]=!0:(v[e]=!0,!1)}function j(e,r,o,l){if(o!==null&&o.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function M(e,r,o,l){if(r===null||typeof r>"u"||j(e,r,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function k(e,r,o,l,c,f,y){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=r,this.sanitizeURL=f,this.removeEmptyString=y}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){w[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];w[r]=new k(r,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){w[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){w[e]=new k(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){w[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){w[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){w[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){w[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){w[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function L(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(E,L);w[r]=new k(r,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(E,L);w[r]=new k(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(E,L);w[r]=new k(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){w[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),w.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){w[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function N(e,r,o,l){var c=w.hasOwnProperty(r)?w[r]:null;(c!==null?c.type!==0:l||!(2b||c[y]!==f[b]){var C=` `+c[y].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=y&&0<=b);break}}}finally{ce=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?U(e):""}function pe(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function X(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case V:return"Portal";case oe:return"Profiler";case z:return"StrictMode";case we:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case be:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Se:return r=e.displayName||null,r!==null?r:X(e.type)||"Memo";case Ee:r=e._payload,e=e._init;try{return X(e(r))}catch{}}return null}function ve(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(r);case 8:return r===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Ne(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function nt(e){var r=ye(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,f=o.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,f.call(this,y)}}),Object.defineProperty(e,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Bt(e){e._valueTracker||(e._valueTracker=nt(e))}function at(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var o=r.getValue(),l="";return e&&(l=ye(e)?e.checked?"true":"false":e.value),e=l,e!==o?(r.setValue(e),!0):!1}function Yt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ut(e,r){var o=r.checked;return B({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function zt(e,r){var o=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;o=Ne(r.value!=null?r.value:o),e._wrapperState={initialChecked:l,initialValue:o,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function xe(e,r){r=r.checked,r!=null&&N(e,"checked",r,!1)}function lt(e,r){xe(e,r);var o=Ne(r.value),l=r.type;if(o!=null)l==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?Zt(e,r.type,o):r.hasOwnProperty("defaultValue")&&Zt(e,r.type,Ne(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function Jt(e,r,o){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,o||r===e.value||(e.value=r),e.defaultValue=r}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Zt(e,r,o){(r!=="number"||Yt(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Fn=Array.isArray;function Bn(e,r,o,l){if(e=e.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=po.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Ys(e,r){if(r){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=r;return}}e.textContent=r}var Js={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vv=["Webkit","ms","Moz","O"];Object.keys(Js).forEach(function(e){vv.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),Js[r]=Js[e]})});function Td(e,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||Js.hasOwnProperty(e)&&Js[e]?(""+r).trim():r+"px"}function Pd(e,r){e=e.style;for(var o in r)if(r.hasOwnProperty(o)){var l=o.indexOf("--")===0,c=Td(o,r[o],l);o==="float"&&(o="cssFloat"),l?e.setProperty(o,c):e[o]=c}}var xv=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nl(e,r){if(r){if(xv[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function rl(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sl=null;function il(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,as=null,ls=null;function Od(e){if(e=wi(e)){if(typeof ol!="function")throw Error(s(280));var r=e.stateNode;r&&(r=Do(r),ol(e.stateNode,e.type,r))}}function Ad(e){as?ls?ls.push(e):ls=[e]:as=e}function jd(){if(as){var e=as,r=ls;if(ls=as=null,Od(e),r)for(e=0;e>>=0,e===0?32:31-(Pv(e)/Ov|0)|0}var vo=64,xo=4194304;function ni(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function wo(e,r){var o=e.pendingLanes;if(o===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,y=o&268435455;if(y!==0){var b=y&~c;b!==0?l=ni(b):(f&=y,f!==0&&(l=ni(f)))}else y=o&~c,y!==0?l=ni(y):f!==0&&(l=ni(f));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,f=r&-r,c>=f||c===16&&(f&4194240)!==0))return r;if((l&4)!==0&&(l|=o&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=l;0o;o++)r.push(e);return r}function ri(e,r,o){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-en(r),e[r]=o}function Iv(e,r){var o=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=di),lf=" ",uf=!1;function cf(e,r){switch(e){case"keyup":return u0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function df(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ds=!1;function d0(e,r){switch(e){case"compositionend":return df(r);case"keypress":return r.which!==32?null:(uf=!0,lf);case"textInput":return e=r.data,e===lf&&uf?null:e;default:return null}}function f0(e,r){if(ds)return e==="compositionend"||!_l&&cf(e,r)?(e=tf(),ko=vl=qn=null,ds=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:o,offset:r-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=vf(o)}}function wf(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?wf(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function bf(){for(var e=window,r=Yt();r instanceof e.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)e=r.contentWindow;else break;r=Yt(e.document)}return r}function Rl(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function b0(e){var r=bf(),o=e.focusedElem,l=e.selectionRange;if(r!==o&&o&&o.ownerDocument&&wf(o.ownerDocument.documentElement,o)){if(l!==null&&Rl(o)){if(r=l.start,e=l.end,e===void 0&&(e=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(e,o.value.length);else if(e=(r=o.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=xf(o,f);var y=xf(o,l);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(r),e.extend(y.node,y.offset)):(r.setEnd(y.node,y.offset),e.addRange(r)))}}for(r=[],e=o;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,fs=null,Nl=null,mi=null,Tl=!1;function Ef(e,r,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Tl||fs==null||fs!==Yt(l)||(l=fs,"selectionStart"in l&&Rl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),mi&&hi(mi,l)||(mi=l,l=jo(Nl,"onSelect"),0ys||(e.current=zl[ys],zl[ys]=null,ys--)}function Be(e,r){ys++,zl[ys]=e.current,e.current=r}var Kn={},ht=Qn(Kn),_t=Qn(!1),kr=Kn;function vs(e,r){var o=e.type.contextTypes;if(!o)return Kn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in o)c[f]=r[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=c),c}function kt(e){return e=e.childContextTypes,e!=null}function Mo(){ze(_t),ze(ht)}function Mf(e,r,o){if(ht.current!==Kn)throw Error(s(168));Be(ht,r),Be(_t,o)}function Ff(e,r,o){var l=e.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(s(108,ve(e)||"Unknown",c));return B({},o,l)}function Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,kr=ht.current,Be(ht,e),Be(_t,_t.current),!0}function Bf(e,r,o){var l=e.stateNode;if(!l)throw Error(s(169));o?(e=Ff(e,r,kr),l.__reactInternalMemoizedMergedChildContext=e,ze(_t),ze(ht),Be(ht,e)):ze(_t),Be(_t,o)}var kn=null,Bo=!1,$l=!1;function Uf(e){kn===null?kn=[e]:kn.push(e)}function j0(e){Bo=!0,Uf(e)}function Gn(){if(!$l&&kn!==null){$l=!0;var e=0,r=Me;try{var o=kn;for(Me=1;e>=y,c-=y,Cn=1<<32-en(r)+c|o<ge?(it=fe,fe=null):it=fe.sibling;var Le=q(I,fe,D[ge],Q);if(Le===null){fe===null&&(fe=it);break}e&&fe&&Le.alternate===null&&r(I,fe),T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le,fe=it}if(ge===D.length)return o(I,fe),$e&&Rr(I,ge),le;if(fe===null){for(;gege?(it=fe,fe=null):it=fe.sibling;var sr=q(I,fe,Le.value,Q);if(sr===null){fe===null&&(fe=it);break}e&&fe&&sr.alternate===null&&r(I,fe),T=f(sr,T,ge),de===null?le=sr:de.sibling=sr,de=sr,fe=it}if(Le.done)return o(I,fe),$e&&Rr(I,ge),le;if(fe===null){for(;!Le.done;ge++,Le=D.next())Le=H(I,Le.value,Q),Le!==null&&(T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le);return $e&&Rr(I,ge),le}for(fe=l(I,fe);!Le.done;ge++,Le=D.next())Le=Z(fe,I,ge,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?ge:Le.key),T=f(Le,T,ge),de===null?le=Le:de.sibling=Le,de=Le);return e&&fe.forEach(function(px){return r(I,px)}),$e&&Rr(I,ge),le}function Ke(I,T,D,Q){if(typeof D=="object"&&D!==null&&D.type===G&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case $:e:{for(var le=D.key,de=T;de!==null;){if(de.key===le){if(le=D.type,le===G){if(de.tag===7){o(I,de.sibling),T=c(de,D.props.children),T.return=I,I=T;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Ee&&Hf(le)===de.type){o(I,de.sibling),T=c(de,D.props),T.ref=bi(I,de,D),T.return=I,I=T;break e}o(I,de);break}else r(I,de);de=de.sibling}D.type===G?(T=Ir(D.props.children,I.mode,Q,D.key),T.return=I,I=T):(Q=pa(D.type,D.key,D.props,null,I.mode,Q),Q.ref=bi(I,T,D),Q.return=I,I=Q)}return y(I);case V:e:{for(de=D.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===D.containerInfo&&T.stateNode.implementation===D.implementation){o(I,T.sibling),T=c(T,D.children||[]),T.return=I,I=T;break e}else{o(I,T);break}else r(I,T);T=T.sibling}T=Bu(D,I.mode,Q),T.return=I,I=T}return y(I);case Ee:return de=D._init,Ke(I,T,de(D._payload),Q)}if(Fn(D))return ne(I,T,D,Q);if(ae(D))return ie(I,T,D,Q);Vo(I,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,T!==null&&T.tag===6?(o(I,T.sibling),T=c(T,D),T.return=I,I=T):(o(I,T),T=Fu(D,I.mode,Q),T.return=I,I=T),y(I)):o(I,T)}return Ke}var Es=Qf(!0),Kf=Qf(!1),qo=Qn(null),Wo=null,Ss=null,Kl=null;function Gl(){Kl=Ss=Wo=null}function Xl(e){var r=qo.current;ze(qo),e._currentValue=r}function Yl(e,r,o){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===o)break;e=e.return}}function _s(e,r){Wo=e,Kl=Ss=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&r)!==0&&(Ct=!0),e.firstContext=null)}function qt(e){var r=e._currentValue;if(Kl!==e)if(e={context:e,memoizedValue:r,next:null},Ss===null){if(Wo===null)throw Error(s(308));Ss=e,Wo.dependencies={lanes:0,firstContext:e}}else Ss=Ss.next=e;return r}var Nr=null;function Jl(e){Nr===null?Nr=[e]:Nr.push(e)}function Gf(e,r,o,l){var c=r.interleaved;return c===null?(o.next=o,Jl(r)):(o.next=c.next,c.next=o),r.interleaved=o,Nn(e,l)}function Nn(e,r){e.lanes|=r;var o=e.alternate;for(o!==null&&(o.lanes|=r),o=e,e=e.return;e!==null;)e.childLanes|=r,o=e.alternate,o!==null&&(o.childLanes|=r),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Xn=!1;function Zl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xf(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tn(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Yn(e,r,o){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(je&2)!==0){var c=l.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),l.pending=r,Nn(e,o)}return c=l.interleaved,c===null?(r.next=r,Jl(l)):(r.next=c.next,c.next=r),l.interleaved=r,Nn(e,o)}function Ho(e,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194240)!==0)){var l=r.lanes;l&=e.pendingLanes,o|=l,r.lanes=o,pl(e,o)}}function Yf(e,r){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var c=null,f=null;if(o=o.firstBaseUpdate,o!==null){do{var y={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};f===null?c=f=y:f=f.next=y,o=o.next}while(o!==null);f===null?c=f=r:f=f.next=r}else c=f=r;o={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=r:e.next=r,o.lastBaseUpdate=r}function Qo(e,r,o,l){var c=e.updateQueue;Xn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var C=b,F=C.next;C.next=null,y===null?f=F:y.next=F,y=C;var W=e.alternate;W!==null&&(W=W.updateQueue,b=W.lastBaseUpdate,b!==y&&(b===null?W.firstBaseUpdate=F:b.next=F,W.lastBaseUpdate=C))}if(f!==null){var H=c.baseState;y=0,W=F=C=null,b=f;do{var q=b.lane,Z=b.eventTime;if((l&q)===q){W!==null&&(W=W.next={eventTime:Z,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var ne=e,ie=b;switch(q=r,Z=o,ie.tag){case 1:if(ne=ie.payload,typeof ne=="function"){H=ne.call(Z,H,q);break e}H=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=ie.payload,q=typeof ne=="function"?ne.call(Z,H,q):ne,q==null)break e;H=B({},H,q);break e;case 2:Xn=!0}}b.callback!==null&&b.lane!==0&&(e.flags|=64,q=c.effects,q===null?c.effects=[b]:q.push(b))}else Z={eventTime:Z,lane:q,tag:b.tag,payload:b.payload,callback:b.callback,next:null},W===null?(F=W=Z,C=H):W=W.next=Z,y|=q;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;q=b,b=q.next,q.next=null,c.lastBaseUpdate=q,c.shared.pending=null}}while(!0);if(W===null&&(C=H),c.baseState=C,c.firstBaseUpdate=F,c.lastBaseUpdate=W,r=c.shared.interleaved,r!==null){c=r;do y|=c.lane,c=c.next;while(c!==r)}else f===null&&(c.shared.lanes=0);Or|=y,e.lanes=y,e.memoizedState=H}}function Jf(e,r,o){if(e=r.effects,r.effects=null,e!==null)for(r=0;ro?o:4,e(!0);var l=su.transition;su.transition={};try{e(!1),r()}finally{Me=o,su.transition=l}}function yp(){return Wt().memoizedState}function M0(e,r,o){var l=tr(e);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},vp(e))xp(r,o);else if(o=Gf(e,r,o,l),o!==null){var c=Et();an(o,e,l,c),wp(o,r,l)}}function F0(e,r,o){var l=tr(e),c={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(vp(e))xp(r,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var y=r.lastRenderedState,b=f(y,o);if(c.hasEagerState=!0,c.eagerState=b,tn(b,y)){var C=r.interleaved;C===null?(c.next=c,Jl(r)):(c.next=C.next,C.next=c),r.interleaved=c;return}}catch{}finally{}o=Gf(e,r,c,l),o!==null&&(c=Et(),an(o,e,l,c),wp(o,r,l))}}function vp(e){var r=e.alternate;return e===qe||r!==null&&r===qe}function xp(e,r){ki=Xo=!0;var o=e.pending;o===null?r.next=r:(r.next=o.next,o.next=r),e.pending=r}function wp(e,r,o){if((o&4194240)!==0){var l=r.lanes;l&=e.pendingLanes,o|=l,r.lanes=o,pl(e,o)}}var Zo={readContext:qt,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useInsertionEffect:mt,useLayoutEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useMutableSource:mt,useSyncExternalStore:mt,useId:mt,unstable_isNewReconciler:!1},B0={readContext:qt,useCallback:function(e,r){return mn().memoizedState=[e,r===void 0?null:r],e},useContext:qt,useEffect:up,useImperativeHandle:function(e,r,o){return o=o!=null?o.concat([e]):null,Yo(4194308,4,fp.bind(null,r,e),o)},useLayoutEffect:function(e,r){return Yo(4194308,4,e,r)},useInsertionEffect:function(e,r){return Yo(4,2,e,r)},useMemo:function(e,r){var o=mn();return r=r===void 0?null:r,e=e(),o.memoizedState=[e,r],e},useReducer:function(e,r,o){var l=mn();return r=o!==void 0?o(r):r,l.memoizedState=l.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=M0.bind(null,qe,e),[l.memoizedState,e]},useRef:function(e){var r=mn();return e={current:e},r.memoizedState=e},useState:ap,useDebugValue:du,useDeferredValue:function(e){return mn().memoizedState=e},useTransition:function(){var e=ap(!1),r=e[0];return e=D0.bind(null,e[1]),mn().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,o){var l=qe,c=mn();if($e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=r(),st===null)throw Error(s(349));(Pr&30)!==0||np(l,r,o)}c.memoizedState=o;var f={value:o,getSnapshot:r};return c.queue=f,up(sp.bind(null,l,f,e),[e]),l.flags|=2048,Ni(9,rp.bind(null,l,f,o,r),void 0,null),o},useId:function(){var e=mn(),r=st.identifierPrefix;if($e){var o=Rn,l=Cn;o=(l&~(1<<32-en(l)-1)).toString(32)+o,r=":"+r+"R"+o,o=Ci++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=y.createElement(o,{is:l.is}):(e=y.createElement(o),o==="select"&&(y=e,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):e=y.createElementNS(e,o),e[pn]=r,e[xi]=l,Up(e,r,!1,!1),r.stateNode=e;e:{switch(y=rl(o,l),o){case"dialog":Ue("cancel",e),Ue("close",e),c=l;break;case"iframe":case"object":case"embed":Ue("load",e),c=l;break;case"video":case"audio":for(c=0;cTs&&(r.flags|=128,l=!0,Ti(f,!1),r.lanes=4194304)}else{if(!l)if(e=Ko(y),e!==null){if(r.flags|=128,l=!0,o=e.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),Ti(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!$e)return gt(r),null}else 2*Qe()-f.renderingStartTime>Ts&&o!==1073741824&&(r.flags|=128,l=!0,Ti(f,!1),r.lanes=4194304);f.isBackwards?(y.sibling=r.child,r.child=y):(o=f.last,o!==null?o.sibling=y:r.child=y,f.last=y)}return f.tail!==null?(r=f.tail,f.rendering=r,f.tail=r.sibling,f.renderingStartTime=Qe(),r.sibling=null,o=Ve.current,Be(Ve,l?o&1|2:o&1),r):(gt(r),null);case 22:case 23:return Iu(),l=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(Dt&1073741824)!==0&&(gt(r),r.subtreeFlags&6&&(r.flags|=8192)):gt(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function Q0(e,r){switch(ql(r),r.tag){case 1:return kt(r.type)&&Mo(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return ks(),ze(_t),ze(ht),ru(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 5:return tu(r),null;case 13:if(ze(Ve),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(s(340));bs()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return ze(Ve),null;case 4:return ks(),null;case 10:return Xl(r.type._context),null;case 22:case 23:return Iu(),null;case 24:return null;default:return null}}var ra=!1,yt=!1,K0=typeof WeakSet=="function"?WeakSet:Set,te=null;function Rs(e,r){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){We(e,r,l)}else o.current=null}function Su(e,r,o){try{o()}catch(l){We(e,r,l)}}var Vp=!1;function G0(e,r){if(Il=So,e=bf(),Rl(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{o.nodeType,f.nodeType}catch{o=null;break e}var y=0,b=-1,C=-1,F=0,W=0,H=e,q=null;t:for(;;){for(var Z;H!==o||c!==0&&H.nodeType!==3||(b=y+c),H!==f||l!==0&&H.nodeType!==3||(C=y+l),H.nodeType===3&&(y+=H.nodeValue.length),(Z=H.firstChild)!==null;)q=H,H=Z;for(;;){if(H===e)break t;if(q===o&&++F===c&&(b=y),q===f&&++W===l&&(C=y),(Z=H.nextSibling)!==null)break;H=q,q=H.parentNode}H=Z}o=b===-1||C===-1?null:{start:b,end:C}}else o=null}o=o||{start:0,end:0}}else o=null;for(Dl={focusedElem:e,selectionRange:o},So=!1,te=r;te!==null;)if(r=te,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,te=e;else for(;te!==null;){r=te;try{var ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var ie=ne.memoizedProps,Ke=ne.memoizedState,I=r.stateNode,T=I.getSnapshotBeforeUpdate(r.elementType===r.type?ie:rn(r.type,ie),Ke);I.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var D=r.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){We(r,r.return,Q)}if(e=r.sibling,e!==null){e.return=r.return,te=e;break}te=r.return}return ne=Vp,Vp=!1,ne}function Pi(e,r,o){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Su(r,o,f)}c=c.next}while(c!==l)}}function sa(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.create;o.destroy=l()}o=o.next}while(o!==r)}}function _u(e){var r=e.ref;if(r!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof r=="function"?r(e):r.current=e}}function qp(e){var r=e.alternate;r!==null&&(e.alternate=null,qp(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[pn],delete r[xi],delete r[Ul],delete r[O0],delete r[A0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Wp(e){return e.tag===5||e.tag===3||e.tag===4}function Hp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ku(e,r,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?o.nodeType===8?o.parentNode.insertBefore(e,r):o.insertBefore(e,r):(o.nodeType===8?(r=o.parentNode,r.insertBefore(e,o)):(r=o,r.appendChild(e)),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=Io));else if(l!==4&&(e=e.child,e!==null))for(ku(e,r,o),e=e.sibling;e!==null;)ku(e,r,o),e=e.sibling}function Cu(e,r,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?o.insertBefore(e,r):o.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Cu(e,r,o),e=e.sibling;e!==null;)Cu(e,r,o),e=e.sibling}var ut=null,sn=!1;function Jn(e,r,o){for(o=o.child;o!==null;)Qp(e,r,o),o=o.sibling}function Qp(e,r,o){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(yo,o)}catch{}switch(o.tag){case 5:yt||Rs(o,r);case 6:var l=ut,c=sn;ut=null,Jn(e,r,o),ut=l,sn=c,ut!==null&&(sn?(e=ut,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):ut.removeChild(o.stateNode));break;case 18:ut!==null&&(sn?(e=ut,o=o.stateNode,e.nodeType===8?Bl(e.parentNode,o):e.nodeType===1&&Bl(e,o),li(e)):Bl(ut,o.stateNode));break;case 4:l=ut,c=sn,ut=o.stateNode.containerInfo,sn=!0,Jn(e,r,o),ut=l,sn=c;break;case 0:case 11:case 14:case 15:if(!yt&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&Su(o,r,y),c=c.next}while(c!==l)}Jn(e,r,o);break;case 1:if(!yt&&(Rs(o,r),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(b){We(o,r,b)}Jn(e,r,o);break;case 21:Jn(e,r,o);break;case 22:o.mode&1?(yt=(l=yt)||o.memoizedState!==null,Jn(e,r,o),yt=l):Jn(e,r,o);break;default:Jn(e,r,o)}}function Kp(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new K0),r.forEach(function(l){var c=sx.bind(null,e,l);o.has(l)||(o.add(l),l.then(c,c))})}}function on(e,r){var o=r.deletions;if(o!==null)for(var l=0;lc&&(c=y),l&=~f}if(l=c,l=Qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Y0(l/1960))-l,10e?16:e,er===null)var l=!1;else{if(e=er,er=null,ua=0,(je&6)!==0)throw Error(s(331));var c=je;for(je|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var b=f.deletions;if(b!==null){for(var C=0;CQe()-Tu?jr(e,0):Nu|=o),Nt(e,r)}function ah(e,r){r===0&&((e.mode&1)===0?r=1:(r=xo,xo<<=1,(xo&130023424)===0&&(xo=4194304)));var o=Et();e=Nn(e,r),e!==null&&(ri(e,r,o),Nt(e,o))}function rx(e){var r=e.memoizedState,o=0;r!==null&&(o=r.retryLane),ah(e,o)}function sx(e,r){var o=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(r),ah(e,o)}var lh;lh=function(e,r,o){if(e!==null)if(e.memoizedProps!==r.pendingProps||_t.current)Ct=!0;else{if((e.lanes&o)===0&&(r.flags&128)===0)return Ct=!1,W0(e,r,o);Ct=(e.flags&131072)!==0}else Ct=!1,$e&&(r.flags&1048576)!==0&&zf(r,zo,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;na(e,r),e=r.pendingProps;var c=vs(r,ht.current);_s(r,o),c=ou(null,r,l,e,c,o);var f=au();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,kt(l)?(f=!0,Fo(r)):f=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Zl(r),c.updater=ea,r.stateNode=c,c._reactInternals=r,pu(r,l,e,o),r=yu(null,r,l,!0,f,o)):(r.tag=0,$e&&f&&Vl(r),bt(null,r,c,o),r=r.child),r;case 16:l=r.elementType;e:{switch(na(e,r),e=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=ox(l),e=rn(l,e),c){case 0:r=gu(null,r,l,e,o);break e;case 1:r=Lp(null,r,l,e,o);break e;case 11:r=Tp(null,r,l,e,o);break e;case 14:r=Pp(null,r,l,rn(l.type,e),o);break e}throw Error(s(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),gu(e,r,l,c,o);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Lp(e,r,l,c,o);case 3:e:{if(Ip(r),e===null)throw Error(s(387));l=r.pendingProps,f=r.memoizedState,c=f.element,Xf(e,r),Qo(r,l,null,o);var y=r.memoizedState;if(l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){c=Cs(Error(s(423)),r),r=Dp(e,r,l,o,c);break e}else if(l!==c){c=Cs(Error(s(424)),r),r=Dp(e,r,l,o,c);break e}else for(It=Hn(r.stateNode.containerInfo.firstChild),Lt=r,$e=!0,nn=null,o=Kf(r,null,l,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(bs(),l===c){r=Pn(e,r,o);break e}bt(e,r,l,o)}r=r.child}return r;case 5:return Zf(r),e===null&&Hl(r),l=r.type,c=r.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,Ml(l,c)?y=null:f!==null&&Ml(l,f)&&(r.flags|=32),jp(e,r),bt(e,r,y,o),r.child;case 6:return e===null&&Hl(r),null;case 13:return Mp(e,r,o);case 4:return eu(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=Es(r,null,l,o):bt(e,r,l,o),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Tp(e,r,l,c,o);case 7:return bt(e,r,r.pendingProps,o),r.child;case 8:return bt(e,r,r.pendingProps.children,o),r.child;case 12:return bt(e,r,r.pendingProps.children,o),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,f=r.memoizedProps,y=c.value,Be(qo,l._currentValue),l._currentValue=y,f!==null)if(tn(f.value,y)){if(f.children===c.children&&!_t.current){r=Pn(e,r,o);break e}}else for(f=r.child,f!==null&&(f.return=r);f!==null;){var b=f.dependencies;if(b!==null){y=f.child;for(var C=b.firstContext;C!==null;){if(C.context===l){if(f.tag===1){C=Tn(-1,o&-o),C.tag=2;var F=f.updateQueue;if(F!==null){F=F.shared;var W=F.pending;W===null?C.next=C:(C.next=W.next,W.next=C),F.pending=C}}f.lanes|=o,C=f.alternate,C!==null&&(C.lanes|=o),Yl(f.return,o,r),b.lanes|=o;break}C=C.next}}else if(f.tag===10)y=f.type===r.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(s(341));y.lanes|=o,b=y.alternate,b!==null&&(b.lanes|=o),Yl(y,o,r),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===r){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}bt(e,r,c.children,o),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,_s(r,o),c=qt(c),l=l(c),r.flags|=1,bt(e,r,l,o),r.child;case 14:return l=r.type,c=rn(l,r.pendingProps),c=rn(l.type,c),Pp(e,r,l,c,o);case 15:return Op(e,r,r.type,r.pendingProps,o);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),na(e,r),r.tag=1,kt(l)?(e=!0,Fo(r)):e=!1,_s(r,o),Ep(r,l,c),pu(r,l,c,o),yu(null,r,l,!0,e,o);case 19:return Bp(e,r,o);case 22:return Ap(e,r,o)}throw Error(s(156,r.tag))};function uh(e,r){return zd(e,r)}function ix(e,r,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,r,o,l){return new ix(e,r,o,l)}function Mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ox(e){if(typeof e=="function")return Mu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===Se)return 14}return 2}function rr(e,r){var o=e.alternate;return o===null?(o=Qt(e.tag,r,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=r,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,r=e.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function pa(e,r,o,l,c,f){var y=2;if(l=e,typeof e=="function")Mu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Ir(o.children,c,f,r);case z:y=8,c|=8;break;case oe:return e=Qt(12,o,r,c|2),e.elementType=oe,e.lanes=f,e;case we:return e=Qt(13,o,r,c),e.elementType=we,e.lanes=f,e;case J:return e=Qt(19,o,r,c),e.elementType=J,e.lanes=f,e;case _e:return ha(o,c,f,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:y=10;break e;case be:y=9;break e;case Te:y=11;break e;case Se:y=14;break e;case Ee:y=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return r=Qt(y,o,r,c),r.elementType=e,r.type=l,r.lanes=f,r}function Ir(e,r,o,l){return e=Qt(7,e,l,r),e.lanes=o,e}function ha(e,r,o,l){return e=Qt(22,e,l,r),e.elementType=_e,e.lanes=o,e.stateNode={isHidden:!1},e}function Fu(e,r,o){return e=Qt(6,e,null,r),e.lanes=o,e}function Bu(e,r,o){return r=Qt(4,e.children!==null?e.children:[],e.key,r),r.lanes=o,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function ax(e,r,o,l,c){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fl(0),this.expirationTimes=fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fl(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Uu(e,r,o,l,c,f,y,b,C){return e=new ax(e,r,o,b,C),r===1?(r=1,f===!0&&(r|=8)):r=0,f=Qt(3,null,null,r),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zl(f),e}function lx(e,r,o){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Qu.exports=Ex(),Qu.exports}var _h;function Sx(){if(_h)return Ea;_h=1;var n=ag();return Ea.createRoot=n.createRoot,Ea.hydrateRoot=n.hydrateRoot,Ea}var _x=Sx();const kx=Kc(_x),Cx=20,Rx=1e6,Mn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Xu=0;function Nx(){return Xu=(Xu+1)%Number.MAX_VALUE,Xu.toString()}const Yu=new Map,kh=n=>{if(Yu.has(n))return;const t=setTimeout(()=>{Yu.delete(n),Wi({type:Mn.REMOVE_TOAST,toastId:n})},Rx);Yu.set(n,t)},Tx=(n,t)=>{switch(t.type){case Mn.ADD_TOAST:return{...n,toasts:[t.toast,...n.toasts].slice(0,Cx)};case Mn.UPDATE_TOAST:return{...n,toasts:n.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case Mn.DISMISS_TOAST:{const{toastId:s}=t;return s?kh(s):n.toasts.forEach(i=>{kh(i.id)}),{...n,toasts:n.toasts.map(i=>i.id===s||s===void 0?{...i,open:!1}:i)}}case Mn.REMOVE_TOAST:return t.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==t.toastId)}}},Aa=[];let ja={toasts:[]};function Wi(n){ja=Tx(ja,n),Aa.forEach(t=>{t(ja)})}function Px({...n}){const t=Nx(),s=a=>Wi({type:Mn.UPDATE_TOAST,toast:{...a,id:t}}),i=()=>Wi({type:Mn.DISMISS_TOAST,toastId:t});return Wi({type:Mn.ADD_TOAST,toast:{...n,id:t,open:!0,onOpenChange:a=>{a||i()}}}),{id:t,dismiss:i,update:s}}function Ox(){const[n,t]=S.useState(ja);return S.useEffect(()=>(Aa.push(t),()=>{const s=Aa.indexOf(t);s>-1&&Aa.splice(s,1)}),[n]),{...n,toast:Px,dismiss:s=>Wi({type:Mn.DISMISS_TOAST,toastId:s})}}var Xc=ag();const Ax=Kc(Xc);function Mt(n,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(n==null||n(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ch(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function Yc(...n){return t=>{let s=!1;const i=n.map(a=>{const u=Ch(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var E;const{scope:_,children:j,...M}=x,k=((E=_==null?void 0:_[n])==null?void 0:E[h])||p,w=S.useMemo(()=>M,Object.values(M));return m.jsx(k.Provider,{value:w,children:j})};g.displayName=u+"Provider";function v(x,_){var k;const j=((k=_==null?void 0:_[n])==null?void 0:k[h])||p,M=S.useContext(j);if(M)return M;if(d!==void 0)return d;throw new Error(`\`${x}\` must be used within \`${u}\``)}return[g,v]}const a=()=>{const u=s.map(d=>S.createContext(d));return function(p){const h=(p==null?void 0:p[n])||u;return S.useMemo(()=>({[`__scope${n}`]:{...p,[n]:h}}),[p,h])}};return a.scopeName=n,[i,jx(a,...t)]}function jx(...n){const t=n[0];if(n.length===1)return t;const s=()=>{const i=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=i.reduce((p,{useScope:h,scopeName:g})=>{const x=h(u)[`__scope${g}`];return{...p,...x}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function Rh(n){const t=Lx(n),s=S.forwardRef((i,a)=>{const{children:u,...d}=i,p=S.Children.toArray(u),h=p.find(Dx);if(h){const g=h.props.children,v=p.map(x=>x===h?S.Children.count(g)>1?S.Children.only(null):S.isValidElement(g)?g.props.children:null:x);return m.jsx(t,{...d,ref:a,children:S.isValidElement(g)?S.cloneElement(g,void 0,v):null})}return m.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Lx(n){const t=S.forwardRef((s,i)=>{const{children:a,...u}=s;if(S.isValidElement(a)){const d=Fx(a),p=Mx(u,a.props);return a.type!==S.Fragment&&(p.ref=i?Yc(i,d):d),S.cloneElement(a,p)}return S.Children.count(a)>1?S.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var Ix=Symbol("radix.slottable");function Dx(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Ix}function Mx(n,t){const s={...t};for(const i in t){const a=n[i],u=t[i];/^on[A-Z]/.test(i)?a&&u?s[i]=(...p)=>{const h=u(...p);return a(...p),h}:a&&(s[i]=a):i==="style"?s[i]={...a,...u}:i==="className"&&(s[i]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Fx(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function Bx(n){const t=n+"CollectionProvider",[s,i]=lg(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=k=>{const{scope:w,children:E}=k,L=ar.useRef(null),N=ar.useRef(new Map).current;return m.jsx(a,{scope:w,itemMap:N,collectionRef:L,children:E})};d.displayName=t;const p=n+"CollectionSlot",h=Rh(p),g=ar.forwardRef((k,w)=>{const{scope:E,children:L}=k,N=u(p,E),A=Jr(w,N.collectionRef);return m.jsx(h,{ref:A,children:L})});g.displayName=p;const v=n+"CollectionItemSlot",x="data-radix-collection-item",_=Rh(v),j=ar.forwardRef((k,w)=>{const{scope:E,children:L,...N}=k,A=ar.useRef(null),$=Jr(w,A),V=u(v,E);return ar.useEffect(()=>(V.itemMap.set(A,{ref:A,...N}),()=>void V.itemMap.delete(A))),m.jsx(_,{[x]:"",ref:$,children:L})});j.displayName=v;function M(k){const w=u(n+"CollectionConsumer",k);return ar.useCallback(()=>{const L=w.collectionRef.current;if(!L)return[];const N=Array.from(L.querySelectorAll(`[${x}]`));return Array.from(w.itemMap.values()).sort((V,G)=>N.indexOf(V.ref.current)-N.indexOf(G.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:d,Slot:g,ItemSlot:j},M,i]}function Ux(n){const t=zx(n),s=S.forwardRef((i,a)=>{const{children:u,...d}=i,p=S.Children.toArray(u),h=p.find(Vx);if(h){const g=h.props.children,v=p.map(x=>x===h?S.Children.count(g)>1?S.Children.only(null):S.isValidElement(g)?g.props.children:null:x);return m.jsx(t,{...d,ref:a,children:S.isValidElement(g)?S.cloneElement(g,void 0,v):null})}return m.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function zx(n){const t=S.forwardRef((s,i)=>{const{children:a,...u}=s;if(S.isValidElement(a)){const d=Wx(a),p=qx(u,a.props);return a.type!==S.Fragment&&(p.ref=i?Yc(i,d):d),S.cloneElement(a,p)}return S.Children.count(a)>1?S.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var $x=Symbol("radix.slottable");function Vx(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===$x}function qx(n,t){const s={...t};for(const i in t){const a=n[i],u=t[i];/^on[A-Z]/.test(i)?a&&u?s[i]=(...p)=>{const h=u(...p);return a(...p),h}:a&&(s[i]=a):i==="style"?s[i]={...a,...u}:i==="className"&&(s[i]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Wx(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Hx=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],En=Hx.reduce((n,t)=>{const s=Ux(`Primitive.${t}`),i=S.forwardRef((a,u)=>{const{asChild:d,...p}=a,h=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(h,{...p,ref:u})});return i.displayName=`Primitive.${t}`,{...n,[t]:i}},{});function ug(n,t){n&&Xc.flushSync(()=>n.dispatchEvent(t))}function Zr(n){const t=S.useRef(n);return S.useEffect(()=>{t.current=n}),S.useMemo(()=>(...s)=>{var i;return(i=t.current)==null?void 0:i.call(t,...s)},[])}function Qx(n,t=globalThis==null?void 0:globalThis.document){const s=Zr(n);S.useEffect(()=>{const i=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[s,t])}var Kx="DismissableLayer",hc="dismissableLayer.update",Gx="dismissableLayer.pointerDownOutside",Xx="dismissableLayer.focusOutside",Nh,cg=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dg=S.forwardRef((n,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:p,...h}=n,g=S.useContext(cg),[v,x]=S.useState(null),_=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=S.useState({}),M=Jr(t,G=>x(G)),k=Array.from(g.layers),[w]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(w),L=v?k.indexOf(v):-1,N=g.layersWithOutsidePointerEventsDisabled.size>0,A=L>=E,$=Jx(G=>{const z=G.target,oe=[...g.branches].some(ue=>ue.contains(z));!A||oe||(a==null||a(G),d==null||d(G),G.defaultPrevented||p==null||p())},_),V=Zx(G=>{const z=G.target;[...g.branches].some(ue=>ue.contains(z))||(u==null||u(G),d==null||d(G),G.defaultPrevented||p==null||p())},_);return Qx(G=>{L===g.layers.size-1&&(i==null||i(G),!G.defaultPrevented&&p&&(G.preventDefault(),p()))},_),S.useEffect(()=>{if(v)return s&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Nh=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(v)),g.layers.add(v),Th(),()=>{s&&g.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=Nh)}},[v,_,s,g]),S.useEffect(()=>()=>{v&&(g.layers.delete(v),g.layersWithOutsidePointerEventsDisabled.delete(v),Th())},[v,g]),S.useEffect(()=>{const G=()=>j({});return document.addEventListener(hc,G),()=>document.removeEventListener(hc,G)},[]),m.jsx(En.div,{...h,ref:M,style:{pointerEvents:N?A?"auto":"none":void 0,...n.style},onFocusCapture:Mt(n.onFocusCapture,V.onFocusCapture),onBlurCapture:Mt(n.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Mt(n.onPointerDownCapture,$.onPointerDownCapture)})});dg.displayName=Kx;var Yx="DismissableLayerBranch",fg=S.forwardRef((n,t)=>{const s=S.useContext(cg),i=S.useRef(null),a=Jr(t,i);return S.useEffect(()=>{const u=i.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),m.jsx(En.div,{...n,ref:a})});fg.displayName=Yx;function Jx(n,t=globalThis==null?void 0:globalThis.document){const s=Zr(n),i=S.useRef(!1),a=S.useRef(()=>{});return S.useEffect(()=>{const u=p=>{if(p.target&&!i.current){let h=function(){pg(Gx,s,g,{discrete:!0})};const g={originalEvent:p};p.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=h,t.addEventListener("click",a.current,{once:!0})):h()}else t.removeEventListener("click",a.current);i.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>i.current=!0}}function Zx(n,t=globalThis==null?void 0:globalThis.document){const s=Zr(n),i=S.useRef(!1);return S.useEffect(()=>{const a=u=>{u.target&&!i.current&&pg(Xx,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Th(){const n=new CustomEvent(hc);document.dispatchEvent(n)}function pg(n,t,s,{discrete:i}){const a=s.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),i?ug(a,u):a.dispatchEvent(u)}var ew=dg,tw=fg,Qi=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},nw="Portal",hg=S.forwardRef((n,t)=>{var p;const{container:s,...i}=n,[a,u]=S.useState(!1);Qi(()=>u(!0),[]);const d=s||a&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return d?Ax.createPortal(m.jsx(En.div,{...i,ref:t}),d):null});hg.displayName=nw;function rw(n,t){return S.useReducer((s,i)=>t[s][i]??s,n)}var mg=n=>{const{present:t,children:s}=n,i=sw(t),a=typeof s=="function"?s({present:i.isPresent}):S.Children.only(s),u=Jr(i.ref,iw(a));return typeof s=="function"||i.isPresent?S.cloneElement(a,{ref:u}):null};mg.displayName="Presence";function sw(n){const[t,s]=S.useState(),i=S.useRef(null),a=S.useRef(n),u=S.useRef("none"),d=n?"mounted":"unmounted",[p,h]=rw(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const g=Sa(i.current);u.current=p==="mounted"?g:"none"},[p]),Qi(()=>{const g=i.current,v=a.current;if(v!==n){const _=u.current,j=Sa(g);n?h("MOUNT"):j==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(v&&_!==j?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,h]),Qi(()=>{if(t){let g;const v=t.ownerDocument.defaultView??window,x=j=>{const k=Sa(i.current).includes(CSS.escape(j.animationName));if(j.target===t&&k&&(h("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",g=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},_=j=>{j.target===t&&(u.current=Sa(i.current))};return t.addEventListener("animationstart",_),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{v.clearTimeout(g),t.removeEventListener("animationstart",_),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:S.useCallback(g=>{i.current=g?getComputedStyle(g):null,s(g)},[])}}function Sa(n){return(n==null?void 0:n.animationName)||"none"}function iw(n){var i,a;let t=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var ow=og[" useInsertionEffect ".trim().toString()]||Qi;function aw({prop:n,defaultProp:t,onChange:s=()=>{},caller:i}){const[a,u,d]=lw({defaultProp:t,onChange:s}),p=n!==void 0,h=p?n:a;{const v=S.useRef(n!==void 0);S.useEffect(()=>{const x=v.current;x!==p&&console.warn(`${i} is changing from ${x?"controlled":"uncontrolled"} to ${p?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=p},[p,i])}const g=S.useCallback(v=>{var x;if(p){const _=uw(v)?v(n):v;_!==n&&((x=d.current)==null||x.call(d,_))}else u(v)},[p,n,u,d]);return[h,g]}function lw({defaultProp:n,onChange:t}){const[s,i]=S.useState(n),a=S.useRef(s),u=S.useRef(t);return ow(()=>{u.current=t},[t]),S.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,i,u]}function uw(n){return typeof n=="function"}var cw=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dw="VisuallyHidden",Jc=S.forwardRef((n,t)=>m.jsx(En.span,{...n,ref:t,style:{...cw,...n.style}}));Jc.displayName=dw;var Zc="ToastProvider",[ed,fw,pw]=Bx("Toast"),[gg]=lg("Toast",[pw]),[hw,Ka]=gg(Zc),yg=n=>{const{__scopeToast:t,label:s="Notification",duration:i=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=n,[p,h]=S.useState(null),[g,v]=S.useState(0),x=S.useRef(!1),_=S.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zc}\`. Expected non-empty \`string\`.`),m.jsx(ed.Provider,{scope:t,children:m.jsx(hw,{scope:t,label:s,duration:i,swipeDirection:a,swipeThreshold:u,toastCount:g,viewport:p,onViewportChange:h,onToastAdd:S.useCallback(()=>v(j=>j+1),[]),onToastRemove:S.useCallback(()=>v(j=>j-1),[]),isFocusedToastEscapeKeyDownRef:x,isClosePausedRef:_,children:d})})};yg.displayName=Zc;var vg="ToastViewport",mw=["F8"],mc="toast.viewportPause",gc="toast.viewportResume",xg=S.forwardRef((n,t)=>{const{__scopeToast:s,hotkey:i=mw,label:a="Notifications ({hotkey})",...u}=n,d=Ka(vg,s),p=fw(s),h=S.useRef(null),g=S.useRef(null),v=S.useRef(null),x=S.useRef(null),_=Jr(t,x,d.onViewportChange),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=d.toastCount>0;S.useEffect(()=>{const w=E=>{var N;i.length!==0&&i.every(A=>E[A]||E.code===A)&&((N=x.current)==null||N.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[i]),S.useEffect(()=>{const w=h.current,E=x.current;if(M&&w&&E){const L=()=>{if(!d.isClosePausedRef.current){const V=new CustomEvent(mc);E.dispatchEvent(V),d.isClosePausedRef.current=!0}},N=()=>{if(d.isClosePausedRef.current){const V=new CustomEvent(gc);E.dispatchEvent(V),d.isClosePausedRef.current=!1}},A=V=>{!w.contains(V.relatedTarget)&&N()},$=()=>{w.contains(document.activeElement)||N()};return w.addEventListener("focusin",L),w.addEventListener("focusout",A),w.addEventListener("pointermove",L),w.addEventListener("pointerleave",$),window.addEventListener("blur",L),window.addEventListener("focus",N),()=>{w.removeEventListener("focusin",L),w.removeEventListener("focusout",A),w.removeEventListener("pointermove",L),w.removeEventListener("pointerleave",$),window.removeEventListener("blur",L),window.removeEventListener("focus",N)}}},[M,d.isClosePausedRef]);const k=S.useCallback(({tabbingDirection:w})=>{const L=p().map(N=>{const A=N.ref.current,$=[A,...Nw(A)];return w==="forwards"?$:$.reverse()});return(w==="forwards"?L.reverse():L).flat()},[p]);return S.useEffect(()=>{const w=x.current;if(w){const E=L=>{var $,V,G;const N=L.altKey||L.ctrlKey||L.metaKey;if(L.key==="Tab"&&!N){const z=document.activeElement,oe=L.shiftKey;if(L.target===w&&oe){($=g.current)==null||$.focus();return}const Te=k({tabbingDirection:oe?"backwards":"forwards"}),we=Te.findIndex(J=>J===z);Ju(Te.slice(we+1))?L.preventDefault():oe?(V=g.current)==null||V.focus():(G=v.current)==null||G.focus()}};return w.addEventListener("keydown",E),()=>w.removeEventListener("keydown",E)}},[p,k]),m.jsxs(tw,{ref:h,role:"region","aria-label":a.replace("{hotkey}",j),tabIndex:-1,style:{pointerEvents:M?void 0:"none"},children:[M&&m.jsx(yc,{ref:g,onFocusFromOutsideViewport:()=>{const w=k({tabbingDirection:"forwards"});Ju(w)}}),m.jsx(ed.Slot,{scope:s,children:m.jsx(En.ol,{tabIndex:-1,...u,ref:_})}),M&&m.jsx(yc,{ref:v,onFocusFromOutsideViewport:()=>{const w=k({tabbingDirection:"backwards"});Ju(w)}})]})});xg.displayName=vg;var wg="ToastFocusProxy",yc=S.forwardRef((n,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:i,...a}=n,u=Ka(wg,s);return m.jsx(Jc,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var g;const p=d.relatedTarget;!((g=u.viewport)!=null&&g.contains(p))&&i()}})});yc.displayName=wg;var so="Toast",gw="toast.swipeStart",yw="toast.swipeMove",vw="toast.swipeCancel",xw="toast.swipeEnd",bg=S.forwardRef((n,t)=>{const{forceMount:s,open:i,defaultOpen:a,onOpenChange:u,...d}=n,[p,h]=aw({prop:i,defaultProp:a??!0,onChange:u,caller:so});return m.jsx(mg,{present:s||p,children:m.jsx(Ew,{open:p,...d,ref:t,onClose:()=>h(!1),onPause:Zr(n.onPause),onResume:Zr(n.onResume),onSwipeStart:Mt(n.onSwipeStart,g=>{g.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Mt(n.onSwipeMove,g=>{const{x:v,y:x}=g.detail.delta;g.currentTarget.setAttribute("data-swipe","move"),g.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),g.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${x}px`)}),onSwipeCancel:Mt(n.onSwipeCancel,g=>{g.currentTarget.setAttribute("data-swipe","cancel"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),g.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Mt(n.onSwipeEnd,g=>{const{x:v,y:x}=g.detail.delta;g.currentTarget.setAttribute("data-swipe","end"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),g.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),g.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),g.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${x}px`),h(!1)})})})});bg.displayName=so;var[ww,bw]=gg(so,{onClose(){}}),Ew=S.forwardRef((n,t)=>{const{__scopeToast:s,type:i="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:p,onPause:h,onResume:g,onSwipeStart:v,onSwipeMove:x,onSwipeCancel:_,onSwipeEnd:j,...M}=n,k=Ka(so,s),[w,E]=S.useState(null),L=Jr(t,J=>E(J)),N=S.useRef(null),A=S.useRef(null),$=a||k.duration,V=S.useRef(0),G=S.useRef($),z=S.useRef(0),{onToastAdd:oe,onToastRemove:ue}=k,be=Zr(()=>{var Se;(w==null?void 0:w.contains(document.activeElement))&&((Se=k.viewport)==null||Se.focus()),d()}),Te=S.useCallback(J=>{!J||J===1/0||(window.clearTimeout(z.current),V.current=new Date().getTime(),z.current=window.setTimeout(be,J))},[be]);S.useEffect(()=>{const J=k.viewport;if(J){const Se=()=>{Te(G.current),g==null||g()},Ee=()=>{const _e=new Date().getTime()-V.current;G.current=G.current-_e,window.clearTimeout(z.current),h==null||h()};return J.addEventListener(mc,Ee),J.addEventListener(gc,Se),()=>{J.removeEventListener(mc,Ee),J.removeEventListener(gc,Se)}}},[k.viewport,$,h,g,Te]),S.useEffect(()=>{u&&!k.isClosePausedRef.current&&Te($)},[u,$,k.isClosePausedRef,Te]),S.useEffect(()=>(oe(),()=>ue()),[oe,ue]);const we=S.useMemo(()=>w?Ng(w):null,[w]);return k.viewport?m.jsxs(m.Fragment,{children:[we&&m.jsx(Sw,{__scopeToast:s,role:"status","aria-live":i==="foreground"?"assertive":"polite",children:we}),m.jsx(ww,{scope:s,onClose:be,children:Xc.createPortal(m.jsx(ed.ItemSlot,{scope:s,children:m.jsx(ew,{asChild:!0,onEscapeKeyDown:Mt(p,()=>{k.isFocusedToastEscapeKeyDownRef.current||be(),k.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(En.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":k.swipeDirection,...M,ref:L,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Mt(n.onKeyDown,J=>{J.key==="Escape"&&(p==null||p(J.nativeEvent),J.nativeEvent.defaultPrevented||(k.isFocusedToastEscapeKeyDownRef.current=!0,be()))}),onPointerDown:Mt(n.onPointerDown,J=>{J.button===0&&(N.current={x:J.clientX,y:J.clientY})}),onPointerMove:Mt(n.onPointerMove,J=>{if(!N.current)return;const Se=J.clientX-N.current.x,Ee=J.clientY-N.current.y,_e=!!A.current,K=["left","right"].includes(k.swipeDirection),ae=["left","up"].includes(k.swipeDirection)?Math.min:Math.max,B=K?ae(0,Se):0,P=K?0:ae(0,Ee),U=J.pointerType==="touch"?10:2,ce={x:B,y:P},me={originalEvent:J,delta:ce};_e?(A.current=ce,_a(yw,x,me,{discrete:!1})):Ph(ce,k.swipeDirection,U)?(A.current=ce,_a(gw,v,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(Se)>U||Math.abs(Ee)>U)&&(N.current=null)}),onPointerUp:Mt(n.onPointerUp,J=>{const Se=A.current,Ee=J.target;if(Ee.hasPointerCapture(J.pointerId)&&Ee.releasePointerCapture(J.pointerId),A.current=null,N.current=null,Se){const _e=J.currentTarget,K={originalEvent:J,delta:Se};Ph(Se,k.swipeDirection,k.swipeThreshold)?_a(xw,j,K,{discrete:!0}):_a(vw,_,K,{discrete:!0}),_e.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),k.viewport)})]}):null}),Sw=n=>{const{__scopeToast:t,children:s,...i}=n,a=Ka(so,t),[u,d]=S.useState(!1),[p,h]=S.useState(!1);return Cw(()=>d(!0)),S.useEffect(()=>{const g=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(g)},[]),p?null:m.jsx(hg,{asChild:!0,children:m.jsx(Jc,{...i,children:u&&m.jsxs(m.Fragment,{children:[a.label," ",s]})})})},_w="ToastTitle",Eg=S.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n;return m.jsx(En.div,{...i,ref:t})});Eg.displayName=_w;var kw="ToastDescription",Sg=S.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n;return m.jsx(En.div,{...i,ref:t})});Sg.displayName=kw;var _g="ToastAction",kg=S.forwardRef((n,t)=>{const{altText:s,...i}=n;return s.trim()?m.jsx(Rg,{altText:s,asChild:!0,children:m.jsx(td,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${_g}\`. Expected non-empty \`string\`.`),null)});kg.displayName=_g;var Cg="ToastClose",td=S.forwardRef((n,t)=>{const{__scopeToast:s,...i}=n,a=bw(Cg,s);return m.jsx(Rg,{asChild:!0,children:m.jsx(En.button,{type:"button",...i,ref:t,onClick:Mt(n.onClick,a.onClose)})})});td.displayName=Cg;var Rg=S.forwardRef((n,t)=>{const{__scopeToast:s,altText:i,...a}=n;return m.jsx(En.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...a,ref:t})});function Ng(n){const t=[];return Array.from(n.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),Rw(i)){const a=i.ariaHidden||i.hidden||i.style.display==="none",u=i.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=i.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Ng(i))}}),t}function _a(n,t,s,{discrete:i}){const a=s.originalEvent.currentTarget,u=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),i?ug(a,u):a.dispatchEvent(u)}var Ph=(n,t,s=0)=>{const i=Math.abs(n.x),a=Math.abs(n.y),u=i>a;return t==="left"||t==="right"?u&&i>s:!u&&a>s};function Cw(n=()=>{}){const t=Zr(n);Qi(()=>{let s=0,i=0;return s=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(i)}},[t])}function Rw(n){return n.nodeType===n.ELEMENT_NODE}function Nw(n){const t=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Ju(n){const t=document.activeElement;return n.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Tw=yg,Tg=xg,Pg=bg,Og=Eg,Ag=Sg,jg=kg,Lg=td;function Ig(n){var t,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(t=0;ttypeof n=="boolean"?`${n}`:n===0?"0":n,Ah=Dg,Pw=(n,t)=>s=>{var i;if((t==null?void 0:t.variants)==null)return Ah(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(g=>{const v=s==null?void 0:s[g],x=u==null?void 0:u[g];if(v===null)return null;const _=Oh(v)||Oh(x);return a[g][_]}),p=s&&Object.entries(s).reduce((g,v)=>{let[x,_]=v;return _===void 0||(g[x]=_),g},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((g,v)=>{let{class:x,className:_,...j}=v;return Object.entries(j).every(M=>{let[k,w]=M;return Array.isArray(w)?w.includes({...u,...p}[k]):{...u,...p}[k]===w})?[...g,x,_]:g},[]);return Ah(n,d,h,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ow=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mg=(...n)=>n.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Aw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jw=S.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:a="",children:u,iconNode:d,...p},h)=>S.createElement("svg",{ref:h,...Aw,width:t,height:t,stroke:n,strokeWidth:i?Number(s)*24/Number(t):s,className:Mg("lucide",a),...p},[...d.map(([g,v])=>S.createElement(g,v)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lw=(n,t)=>{const s=S.forwardRef(({className:i,...a},u)=>S.createElement(jw,{ref:u,iconNode:t,className:Mg(`lucide-${Ow(n)}`,i),...a}));return s.displayName=`${n}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Iw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Dw=Lw("X",Iw),Mw=(n,t)=>{const s=new Array(n.length+t.length);for(let i=0;i({classGroupId:n,validator:t}),Fg=(n=new Map,t=null,s)=>({nextPart:n,validators:t,classGroupId:s}),$a="-",jh=[],Bw="arbitrary..",Uw=n=>{const t=$w(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return zw(d);const p=d.split($a),h=p[0]===""&&p.length>1?1:0;return Bg(p,h,t)},getConflictingClassGroupIds:(d,p)=>{if(p){const h=i[d],g=s[d];return h?g?Mw(g,h):h:g||jh}return s[d]||jh}}},Bg=(n,t,s)=>{if(n.length-t===0)return s.classGroupId;const a=n[t],u=s.nextPart.get(a);if(u){const g=Bg(n,t+1,u);if(g)return g}const d=s.validators;if(d===null)return;const p=t===0?n.join($a):n.slice(t).join($a),h=d.length;for(let g=0;gn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=n.slice(1,-1),s=t.indexOf(":"),i=t.slice(0,s);return i?Bw+i:void 0})(),$w=n=>{const{theme:t,classGroups:s}=n;return Vw(s,t)},Vw=(n,t)=>{const s=Fg();for(const i in n){const a=n[i];nd(a,s,i,t)}return s},nd=(n,t,s,i)=>{const a=n.length;for(let u=0;u{if(typeof n=="string"){Ww(n,t,s);return}if(typeof n=="function"){Hw(n,t,s,i);return}Qw(n,t,s,i)},Ww=(n,t,s)=>{const i=n===""?t:Ug(t,n);i.classGroupId=s},Hw=(n,t,s,i)=>{if(Kw(n)){nd(n(i),t,s,i);return}t.validators===null&&(t.validators=[]),t.validators.push(Fw(s,n))},Qw=(n,t,s,i)=>{const a=Object.entries(n),u=a.length;for(let d=0;d{let s=n;const i=t.split($a),a=i.length;for(let u=0;u"isThemeGetter"in n&&n.isThemeGetter===!0,Gw=n=>{if(n<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),i=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>n&&(t=0,i=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},vc="!",Lh=":",Xw=[],Ih=(n,t,s,i,a)=>({modifiers:n,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:i,isExternal:a}),Yw=n=>{const{prefix:t,experimentalParseClassName:s}=n;let i=a=>{const u=[];let d=0,p=0,h=0,g;const v=a.length;for(let k=0;kh?g-h:void 0;return Ih(u,j,_,M)};if(t){const a=t+Lh,u=i;i=d=>d.startsWith(a)?u(d.slice(a.length)):Ih(Xw,!1,d,void 0,!0)}if(s){const a=i;i=u=>s({className:u,parseClassName:a})}return i},Jw=n=>{const t=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{t.set(s,1e6+i)}),s=>{const i=[];let a=[];for(let u=0;u0&&(a.sort(),i.push(...a),a=[]),i.push(d)):a.push(d)}return a.length>0&&(a.sort(),i.push(...a)),i}},Zw=n=>({cache:Gw(n.cacheSize),parseClassName:Yw(n),sortModifiers:Jw(n),...Uw(n)}),e1=/\s+/,t1=(n,t)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],p=n.trim().split(e1);let h="";for(let g=p.length-1;g>=0;g-=1){const v=p[g],{isExternal:x,modifiers:_,hasImportantModifier:j,baseClassName:M,maybePostfixModifierPosition:k}=s(v);if(x){h=v+(h.length>0?" "+h:h);continue}let w=!!k,E=i(w?M.substring(0,k):M);if(!E){if(!w){h=v+(h.length>0?" "+h:h);continue}if(E=i(M),!E){h=v+(h.length>0?" "+h:h);continue}w=!1}const L=_.length===0?"":_.length===1?_[0]:u(_).join(":"),N=j?L+vc:L,A=N+E;if(d.indexOf(A)>-1)continue;d.push(A);const $=a(E,w);for(let V=0;V<$.length;++V){const G=$[V];d.push(N+G)}h=v+(h.length>0?" "+h:h)}return h},n1=(...n)=>{let t=0,s,i,a="";for(;t{if(typeof n=="string")return n;let t,s="";for(let i=0;i{let s,i,a,u;const d=h=>{const g=t.reduce((v,x)=>x(v),n());return s=Zw(g),i=s.cache.get,a=s.cache.set,u=p,p(h)},p=h=>{const g=i(h);if(g)return g;const v=t1(h,s);return a(h,v),v};return u=d,(...h)=>u(n1(...h))},s1=[],tt=n=>{const t=s=>s[n]||s1;return t.isThemeGetter=!0,t},$g=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,i1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,o1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,l1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,u1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,c1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ir=n=>i1.test(n),ke=n=>!!n&&!Number.isNaN(Number(n)),or=n=>!!n&&Number.isInteger(Number(n)),Zu=n=>n.endsWith("%")&&ke(n.slice(0,-1)),An=n=>o1.test(n),qg=()=>!0,d1=n=>a1.test(n)&&!l1.test(n),rd=()=>!1,f1=n=>u1.test(n),p1=n=>c1.test(n),h1=n=>!re(n)&&!se(n),m1=n=>br(n,Qg,rd),re=n=>$g.test(n),Dr=n=>br(n,Kg,d1),Dh=n=>br(n,S1,ke),g1=n=>br(n,Xg,qg),y1=n=>br(n,Gg,rd),Mh=n=>br(n,Wg,rd),v1=n=>br(n,Hg,p1),ka=n=>br(n,Yg,f1),se=n=>Vg.test(n),Di=n=>rs(n,Kg),x1=n=>rs(n,Gg),Fh=n=>rs(n,Wg),w1=n=>rs(n,Qg),b1=n=>rs(n,Hg),Ca=n=>rs(n,Yg,!0),E1=n=>rs(n,Xg,!0),br=(n,t,s)=>{const i=$g.exec(n);return i?i[1]?t(i[1]):s(i[2]):!1},rs=(n,t,s=!1)=>{const i=Vg.exec(n);return i?i[1]?t(i[1]):s:!1},Wg=n=>n==="position"||n==="percentage",Hg=n=>n==="image"||n==="url",Qg=n=>n==="length"||n==="size"||n==="bg-size",Kg=n=>n==="length",S1=n=>n==="number",Gg=n=>n==="family-name",Xg=n=>n==="number"||n==="weight",Yg=n=>n==="shadow",_1=()=>{const n=tt("color"),t=tt("font"),s=tt("text"),i=tt("font-weight"),a=tt("tracking"),u=tt("leading"),d=tt("breakpoint"),p=tt("container"),h=tt("spacing"),g=tt("radius"),v=tt("shadow"),x=tt("inset-shadow"),_=tt("text-shadow"),j=tt("drop-shadow"),M=tt("blur"),k=tt("perspective"),w=tt("aspect"),E=tt("ease"),L=tt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...A(),se,re],V=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],z=()=>[se,re,h],oe=()=>[ir,"full","auto",...z()],ue=()=>[or,"none","subgrid",se,re],be=()=>["auto",{span:["full",or,se,re]},or,se,re],Te=()=>[or,"auto",se,re],we=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Se=()=>["start","end","center","stretch","center-safe","end-safe"],Ee=()=>["auto",...z()],_e=()=>[ir,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],K=()=>[ir,"screen","full","dvw","lvw","svw","min","max","fit",...z()],ae=()=>[ir,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],B=()=>[n,se,re],P=()=>[...A(),Fh,Mh,{position:[se,re]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",w1,m1,{size:[se,re]}],me=()=>[Zu,Di,Dr],pe=()=>["","none","full",g,se,re],X=()=>["",ke,Di,Dr],ve=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[ke,Zu,Fh,Mh],nt=()=>["","none",M,se,re],Bt=()=>["none",ke,se,re],at=()=>["none",ke,se,re],Yt=()=>[ke,se,re],Ut=()=>[ir,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[An],breakpoint:[An],color:[qg],container:[An],"drop-shadow":[An],ease:["in","out","in-out"],font:[h1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[An],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[An],shadow:[An],spacing:["px",ke],text:[An],"text-shadow":[An],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ir,re,se,w]}],container:["container"],columns:[{columns:[ke,re,se,p]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{"inset-s":oe(),start:oe()}],end:[{"inset-e":oe(),end:oe()}],"inset-bs":[{"inset-bs":oe()}],"inset-be":[{"inset-be":oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",se,re]}],basis:[{basis:[ir,"full","auto",p,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,ir,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[or,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Se(),"normal"]}],"justify-self":[{"justify-self":["auto",...Se()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Se(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Se(),"baseline"]}],"place-self":[{"place-self":["auto",...Se()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:Ee()}],mx:[{mx:Ee()}],my:[{my:Ee()}],ms:[{ms:Ee()}],me:[{me:Ee()}],mbs:[{mbs:Ee()}],mbe:[{mbe:Ee()}],mt:[{mt:Ee()}],mr:[{mr:Ee()}],mb:[{mb:Ee()}],ml:[{ml:Ee()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[p,"screen",..._e()]}],"min-w":[{"min-w":[p,"screen","none",..._e()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[d]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",s,Di,Dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,E1,g1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zu,re]}],"font-family":[{font:[x1,y1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,Dh]}],leading:[{leading:[u,...z()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,Dr]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,se,re],radial:["",se,re],conic:[or,se,re]},b1,v1]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,Di,Dr]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",v,Ca,ka]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",x,Ca,ka]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[ke,Dr]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",_,Ca,ka]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:nt()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",j,Ca,ka]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":nt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",E,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",L,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,se,re]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:Bt()}],"rotate-x":[{"rotate-x":Bt()}],"rotate-y":[{"rotate-y":Bt()}],"rotate-z":[{"rotate-z":Bt()}],scale:[{scale:at()}],"scale-x":[{"scale-x":at()}],"scale-y":[{"scale-y":at()}],"scale-z":[{"scale-z":at()}],"scale-3d":["scale-3d"],skew:[{skew:Yt()}],"skew-x":[{"skew-x":Yt()}],"skew-y":[{"skew-y":Yt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[ke,Di,Dr,Dh]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},k1=r1(_1);function Er(...n){return k1(Dg(n))}const C1=Tw,Jg=S.forwardRef(({className:n,...t},s)=>m.jsx(Tg,{ref:s,className:Er("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",n),...t}));Jg.displayName=Tg.displayName;const R1=Pw("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Zg=S.forwardRef(({className:n,variant:t,...s},i)=>m.jsx(Pg,{ref:i,className:Er(R1({variant:t}),n),...s}));Zg.displayName=Pg.displayName;const N1=S.forwardRef(({className:n,...t},s)=>m.jsx(jg,{ref:s,className:Er("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...t}));N1.displayName=jg.displayName;const ey=S.forwardRef(({className:n,...t},s)=>m.jsx(Lg,{ref:s,className:Er("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...t,children:m.jsx(Dw,{className:"h-4 w-4"})}));ey.displayName=Lg.displayName;const ty=S.forwardRef(({className:n,...t},s)=>m.jsx(Og,{ref:s,className:Er("text-sm font-semibold",n),...t}));ty.displayName=Og.displayName;const ny=S.forwardRef(({className:n,...t},s)=>m.jsx(Ag,{ref:s,className:Er("text-sm opacity-90",n),...t}));ny.displayName=Ag.displayName;function T1(){const{toasts:n}=Ox();return m.jsxs(C1,{children:[n.map(function({id:t,title:s,description:i,action:a,...u}){return m.jsxs(Zg,{...u,children:[m.jsxs("div",{className:"grid gap-1",children:[s&&m.jsx(ty,{children:s}),i&&m.jsx(ny,{children:i})]}),a,m.jsx(ey,{})]},t)}),m.jsx(Jg,{})]})}var io=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},P1={setTimeout:(n,t)=>setTimeout(n,t),clearTimeout:n=>clearTimeout(n),setInterval:(n,t)=>setInterval(n,t),clearInterval:n=>clearInterval(n)},ur,Qc,Gm,O1=(Gm=class{constructor(){he(this,ur,P1);he(this,Qc,!1)}setTimeoutProvider(n){ee(this,ur,n)}setTimeout(n,t){return R(this,ur).setTimeout(n,t)}clearTimeout(n){R(this,ur).clearTimeout(n)}setInterval(n,t){return R(this,ur).setInterval(n,t)}clearInterval(n){R(this,ur).clearInterval(n)}},ur=new WeakMap,Qc=new WeakMap,Gm),Br=new O1;function A1(n){setTimeout(n,0)}var es=typeof window>"u"||"Deno"in globalThis;function Ot(){}function j1(n,t){return typeof n=="function"?n(t):n}function xc(n){return typeof n=="number"&&n>=0&&n!==1/0}function ry(n,t){return Math.max(n+(t||0)-Date.now(),0)}function vr(n,t){return typeof n=="function"?n(t):n}function Gt(n,t){return typeof n=="function"?n(t):n}function Bh(n,t){const{type:s="all",exact:i,fetchStatus:a,predicate:u,queryKey:d,stale:p}=n;if(d){if(i){if(t.queryHash!==sd(d,t.options))return!1}else if(!Gi(t.queryKey,d))return!1}if(s!=="all"){const h=t.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof p=="boolean"&&t.isStale()!==p||a&&a!==t.state.fetchStatus||u&&!u(t))}function Uh(n,t){const{exact:s,status:i,predicate:a,mutationKey:u}=n;if(u){if(!t.options.mutationKey)return!1;if(s){if(Ki(t.options.mutationKey)!==Ki(u))return!1}else if(!Gi(t.options.mutationKey,u))return!1}return!(i&&t.state.status!==i||a&&!a(t))}function sd(n,t){return((t==null?void 0:t.queryKeyHashFn)||Ki)(n)}function Ki(n){return JSON.stringify(n,(t,s)=>bc(s)?Object.keys(s).sort().reduce((i,a)=>(i[a]=s[a],i),{}):s)}function Gi(n,t){return n===t?!0:typeof n!=typeof t?!1:n&&t&&typeof n=="object"&&typeof t=="object"?Object.keys(t).every(s=>Gi(n[s],t[s])):!1}var L1=Object.prototype.hasOwnProperty;function sy(n,t,s=0){if(n===t)return n;if(s>500)return t;const i=zh(n)&&zh(t);if(!i&&!(bc(n)&&bc(t)))return t;const u=(i?n:Object.keys(n)).length,d=i?t:Object.keys(t),p=d.length,h=i?new Array(p):{};let g=0;for(let v=0;v{Br.setTimeout(t,n)})}function Ec(n,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,t):s.structuralSharing!==!1?sy(n,t):t}function D1(n,t,s=0){const i=[...n,t];return s&&i.length>s?i.slice(1):i}function M1(n,t,s=0){const i=[t,...n];return s&&i.length>s?i.slice(0,-1):i}var id=Symbol();function iy(n,t){return!n.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!n.queryFn||n.queryFn===id?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function oy(n,t){return typeof n=="function"?n(...t):!!n}function F1(n,t,s){let i=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=t()),i||(i=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var zr,cr,js,Xm,B1=(Xm=class extends io{constructor(){super();he(this,zr);he(this,cr);he(this,js);ee(this,js,t=>{if(!es&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,cr)||this.setEventListener(R(this,js))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,cr))==null||t.call(this),ee(this,cr,void 0))}setEventListener(t){var s;ee(this,js,t),(s=R(this,cr))==null||s.call(this),ee(this,cr,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){R(this,zr)!==t&&(ee(this,zr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,zr)=="boolean"?R(this,zr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zr=new WeakMap,cr=new WeakMap,js=new WeakMap,Xm),od=new B1;function Sc(){let n,t;const s=new Promise((a,u)=>{n=a,t=u});s.status="pending",s.catch(()=>{});function i(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{i({status:"fulfilled",value:a}),n(a)},s.reject=a=>{i({status:"rejected",reason:a}),t(a)},s}var U1=A1;function z1(){let n=[],t=0,s=p=>{p()},i=p=>{p()},a=U1;const u=p=>{t?n.push(p):a(()=>{s(p)})},d=()=>{const p=n;n=[],p.length&&a(()=>{i(()=>{p.forEach(h=>{s(h)})})})};return{batch:p=>{let h;t++;try{h=p()}finally{t--,t||d()}return h},batchCalls:p=>(...h)=>{u(()=>{p(...h)})},schedule:u,setNotifyFunction:p=>{s=p},setBatchNotifyFunction:p=>{i=p},setScheduler:p=>{a=p}}}var ft=z1(),Ls,dr,Is,Ym,$1=(Ym=class extends io{constructor(){super();he(this,Ls,!0);he(this,dr);he(this,Is);ee(this,Is,t=>{if(!es&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){R(this,dr)||this.setEventListener(R(this,Is))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,dr))==null||t.call(this),ee(this,dr,void 0))}setEventListener(t){var s;ee(this,Is,t),(s=R(this,dr))==null||s.call(this),ee(this,dr,t(this.setOnline.bind(this)))}setOnline(t){R(this,Ls)!==t&&(ee(this,Ls,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return R(this,Ls)}},Ls=new WeakMap,dr=new WeakMap,Is=new WeakMap,Ym),Va=new $1;function V1(n){return Math.min(1e3*2**n,3e4)}function ay(n){return(n??"online")==="online"?Va.isOnline():!0}var _c=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function ly(n){let t=!1,s=0,i;const a=Sc(),u=()=>a.status!=="pending",d=k=>{var w;if(!u()){const E=new _c(k);_(E),(w=n.onCancel)==null||w.call(n,E)}},p=()=>{t=!0},h=()=>{t=!1},g=()=>od.isFocused()&&(n.networkMode==="always"||Va.isOnline())&&n.canRun(),v=()=>ay(n.networkMode)&&n.canRun(),x=k=>{u()||(i==null||i(),a.resolve(k))},_=k=>{u()||(i==null||i(),a.reject(k))},j=()=>new Promise(k=>{var w;i=E=>{(u()||g())&&k(E)},(w=n.onPause)==null||w.call(n)}).then(()=>{var k;i=void 0,u()||(k=n.onContinue)==null||k.call(n)}),M=()=>{if(u())return;let k;const w=s===0?n.initialPromise:void 0;try{k=w??n.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(x).catch(E=>{var V;if(u())return;const L=n.retry??(es?0:3),N=n.retryDelay??V1,A=typeof N=="function"?N(s,E):N,$=L===!0||typeof L=="number"&&sg()?void 0:j()).then(()=>{t?_(E):M()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(i==null||i(),a),cancelRetry:p,continueRetry:h,canStart:v,start:()=>(v()?M():j().then(M),a)}}var $r,Jm,uy=(Jm=class{constructor(){he(this,$r)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xc(this.gcTime)&&ee(this,$r,Br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(es?1/0:300*1e3))}clearGcTimeout(){R(this,$r)&&(Br.clearTimeout(R(this,$r)),ee(this,$r,void 0))}},$r=new WeakMap,Jm),Vr,Ds,Kt,qr,ot,Zi,Wr,ln,jn,Zm,q1=(Zm=class extends uy{constructor(t){super();he(this,ln);he(this,Vr);he(this,Ds);he(this,Kt);he(this,qr);he(this,ot);he(this,Zi);he(this,Wr);ee(this,Wr,!1),ee(this,Zi,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,qr,t.client),ee(this,Kt,R(this,qr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Vr,qh(this.options)),this.state=t.state??R(this,Vr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,ot))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,Zi),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=qh(this.options);s.data!==void 0&&(this.setState(Vh(s.data,s.dataUpdatedAt)),ee(this,Vr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Kt).remove(this)}setData(t,s){const i=Ec(this.state.data,t,this.options);return Pe(this,ln,jn).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(t,s){Pe(this,ln,jn).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var i,a;const s=(i=R(this,ot))==null?void 0:i.promise;return(a=R(this,ot))==null||a.cancel(t),s?s.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Vr))}isActive(){return this.observers.some(t=>Gt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===id||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ry(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}onOnline(){var s;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Kt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(R(this,ot)&&(R(this,Wr)?R(this,ot).cancel({revert:!0}):R(this,ot).cancelRetry()),this.scheduleGc()),R(this,Kt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,ln,jn).call(this,{type:"invalidate"})}async fetch(t,s){var h,g,v,x,_,j,M,k,w,E,L,N;if(this.state.fetchStatus!=="idle"&&((h=R(this,ot))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,ot))return R(this,ot).continueRetry(),R(this,ot).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find($=>$.options.queryFn);A&&this.setOptions(A.options)}const i=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ee(this,Wr,!0),i.signal)})},u=()=>{const A=iy(this.options,s),V=(()=>{const G={client:R(this,qr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,Wr,!1),this.options.persister?this.options.persister(A,V,this):A(V)},p=(()=>{const A={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,qr),state:this.state,fetchFn:u};return a(A),A})();(g=this.options.behavior)==null||g.onFetch(p,this),ee(this,Ds,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=p.fetchOptions)==null?void 0:v.meta))&&Pe(this,ln,jn).call(this,{type:"fetch",meta:(x=p.fetchOptions)==null?void 0:x.meta}),ee(this,ot,ly({initialPromise:s==null?void 0:s.initialPromise,fn:p.fetchFn,onCancel:A=>{A instanceof _c&&A.revert&&this.setState({...R(this,Ds),fetchStatus:"idle"}),i.abort()},onFail:(A,$)=>{Pe(this,ln,jn).call(this,{type:"failed",failureCount:A,error:$})},onPause:()=>{Pe(this,ln,jn).call(this,{type:"pause"})},onContinue:()=>{Pe(this,ln,jn).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const A=await R(this,ot).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(j=(_=R(this,Kt).config).onSuccess)==null||j.call(_,A,this),(k=(M=R(this,Kt).config).onSettled)==null||k.call(M,A,this.state.error,this),A}catch(A){if(A instanceof _c){if(A.silent)return R(this,ot).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Pe(this,ln,jn).call(this,{type:"error",error:A}),(E=(w=R(this,Kt).config).onError)==null||E.call(w,A,this),(N=(L=R(this,Kt).config).onSettled)==null||N.call(L,this.state.data,A,this),A}finally{this.scheduleGc()}}},Vr=new WeakMap,Ds=new WeakMap,Kt=new WeakMap,qr=new WeakMap,ot=new WeakMap,Zi=new WeakMap,Wr=new WeakMap,ln=new WeakSet,jn=function(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...cy(i.data,this.options),fetchMeta:t.meta??null};case"success":const a={...i,...Vh(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Ds,t.manual?a:void 0),a;case"error":const u=t.error;return{...i,error:u,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),ft.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),R(this,Kt).notify({query:this,type:"updated",action:t})})},Zm);function cy(n,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ay(t.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Vh(n,t){return{data:n,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qh(n){const t=typeof n.initialData=="function"?n.initialData():n.initialData,s=t!==void 0,i=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pt,Oe,eo,St,Hr,Ms,In,fr,to,Fs,Bs,Qr,Kr,pr,Us,De,Ui,kc,Cc,Rc,Nc,Tc,Pc,Oc,dy,eg,W1=(eg=class extends io{constructor(t,s){super();he(this,De);he(this,Pt);he(this,Oe);he(this,eo);he(this,St);he(this,Hr);he(this,Ms);he(this,In);he(this,fr);he(this,to);he(this,Fs);he(this,Bs);he(this,Qr);he(this,Kr);he(this,pr);he(this,Us,new Set);this.options=s,ee(this,Pt,t),ee(this,fr,null),ee(this,In,Sc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Oe).addObserver(this),Wh(R(this,Oe),this.options)?Pe(this,De,Ui).call(this):this.updateResult(),Pe(this,De,Nc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ac(R(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ac(R(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,De,Tc).call(this),Pe(this,De,Pc).call(this),R(this,Oe).removeObserver(this)}setOptions(t){const s=this.options,i=R(this,Oe);if(this.options=R(this,Pt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gt(this.options.enabled,R(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,De,Oc).call(this),R(this,Oe).setOptions(this.options),s._defaulted&&!wc(this.options,s)&&R(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Oe),observer:this});const a=this.hasListeners();a&&Hh(R(this,Oe),i,this.options,s)&&Pe(this,De,Ui).call(this),this.updateResult(),a&&(R(this,Oe)!==i||Gt(this.options.enabled,R(this,Oe))!==Gt(s.enabled,R(this,Oe))||vr(this.options.staleTime,R(this,Oe))!==vr(s.staleTime,R(this,Oe)))&&Pe(this,De,kc).call(this);const u=Pe(this,De,Cc).call(this);a&&(R(this,Oe)!==i||Gt(this.options.enabled,R(this,Oe))!==Gt(s.enabled,R(this,Oe))||u!==R(this,pr))&&Pe(this,De,Rc).call(this,u)}getOptimisticResult(t){const s=R(this,Pt).getQueryCache().build(R(this,Pt),t),i=this.createResult(s,t);return Q1(this,i)&&(ee(this,St,i),ee(this,Ms,this.options),ee(this,Hr,R(this,Oe).state)),i}getCurrentResult(){return R(this,St)}trackResult(t,s){return new Proxy(t,{get:(i,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,In).status==="pending"&&R(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,a))})}trackProp(t){R(this,Us).add(t)}getCurrentQuery(){return R(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,Pt).defaultQueryOptions(t),i=R(this,Pt).getQueryCache().build(R(this,Pt),s);return i.fetch().then(()=>this.createResult(i,s))}fetch(t){return Pe(this,De,Ui).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,St)))}createResult(t,s){var oe;const i=R(this,Oe),a=this.options,u=R(this,St),d=R(this,Hr),p=R(this,Ms),g=t!==i?t.state:R(this,eo),{state:v}=t;let x={...v},_=!1,j;if(s._optimisticResults){const ue=this.hasListeners(),be=!ue&&Wh(t,s),Te=ue&&Hh(t,i,s,a);(be||Te)&&(x={...x,...cy(v.data,t.options)}),s._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:M,errorUpdatedAt:k,status:w}=x;j=x.data;let E=!1;if(s.placeholderData!==void 0&&j===void 0&&w==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(p==null?void 0:p.placeholderData)?(ue=u.data,E=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((oe=R(this,Bs))==null?void 0:oe.state.data,R(this,Bs)):s.placeholderData,ue!==void 0&&(w="success",j=Ec(u==null?void 0:u.data,ue,s),_=!0)}if(s.select&&j!==void 0&&!E)if(u&&j===(d==null?void 0:d.data)&&s.select===R(this,to))j=R(this,Fs);else try{ee(this,to,s.select),j=s.select(j),j=Ec(u==null?void 0:u.data,j,s),ee(this,Fs,j),ee(this,fr,null)}catch(ue){ee(this,fr,ue)}R(this,fr)&&(M=R(this,fr),j=R(this,Fs),k=Date.now(),w="error");const L=x.fetchStatus==="fetching",N=w==="pending",A=w==="error",$=N&&L,V=j!==void 0,z={status:w,fetchStatus:x.fetchStatus,isPending:N,isSuccess:w==="success",isError:A,isInitialLoading:$,isLoading:$,data:j,dataUpdatedAt:x.dataUpdatedAt,error:M,errorUpdatedAt:k,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:L,isRefetching:L&&!N,isLoadingError:A&&!V,isPaused:x.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:A&&V,isStale:ad(t,s),refetch:this.refetch,promise:R(this,In),isEnabled:Gt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=z.data!==void 0,be=z.status==="error"&&!ue,Te=Se=>{be?Se.reject(z.error):ue&&Se.resolve(z.data)},we=()=>{const Se=ee(this,In,z.promise=Sc());Te(Se)},J=R(this,In);switch(J.status){case"pending":t.queryHash===i.queryHash&&Te(J);break;case"fulfilled":(be||z.data!==J.value)&&we();break;case"rejected":(!be||z.error!==J.reason)&&we();break}}return z}updateResult(){const t=R(this,St),s=this.createResult(R(this,Oe),this.options);if(ee(this,Hr,R(this,Oe).state),ee(this,Ms,this.options),R(this,Hr).data!==void 0&&ee(this,Bs,R(this,Oe)),wc(s,t))return;ee(this,St,s);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!R(this,Us).size)return!0;const d=new Set(u??R(this,Us));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,St)).some(p=>{const h=p;return R(this,St)[h]!==t[h]&&d.has(h)})};Pe(this,De,dy).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,De,Nc).call(this)}},Pt=new WeakMap,Oe=new WeakMap,eo=new WeakMap,St=new WeakMap,Hr=new WeakMap,Ms=new WeakMap,In=new WeakMap,fr=new WeakMap,to=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,Qr=new WeakMap,Kr=new WeakMap,pr=new WeakMap,Us=new WeakMap,De=new WeakSet,Ui=function(t){Pe(this,De,Oc).call(this);let s=R(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Ot)),s},kc=function(){Pe(this,De,Tc).call(this);const t=vr(this.options.staleTime,R(this,Oe));if(es||R(this,St).isStale||!xc(t))return;const i=ry(R(this,St).dataUpdatedAt,t)+1;ee(this,Qr,Br.setTimeout(()=>{R(this,St).isStale||this.updateResult()},i))},Cc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Oe)):this.options.refetchInterval)??!1},Rc=function(t){Pe(this,De,Pc).call(this),ee(this,pr,t),!(es||Gt(this.options.enabled,R(this,Oe))===!1||!xc(R(this,pr))||R(this,pr)===0)&&ee(this,Kr,Br.setInterval(()=>{(this.options.refetchIntervalInBackground||od.isFocused())&&Pe(this,De,Ui).call(this)},R(this,pr)))},Nc=function(){Pe(this,De,kc).call(this),Pe(this,De,Rc).call(this,Pe(this,De,Cc).call(this))},Tc=function(){R(this,Qr)&&(Br.clearTimeout(R(this,Qr)),ee(this,Qr,void 0))},Pc=function(){R(this,Kr)&&(Br.clearInterval(R(this,Kr)),ee(this,Kr,void 0))},Oc=function(){const t=R(this,Pt).getQueryCache().build(R(this,Pt),this.options);if(t===R(this,Oe))return;const s=R(this,Oe);ee(this,Oe,t),ee(this,eo,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},dy=function(t){ft.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(R(this,St))}),R(this,Pt).getQueryCache().notify({query:R(this,Oe),type:"observerResultsUpdated"})})},eg);function H1(n,t){return Gt(t.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&t.retryOnMount===!1)}function Wh(n,t){return H1(n,t)||n.state.data!==void 0&&Ac(n,t,t.refetchOnMount)}function Ac(n,t,s){if(Gt(t.enabled,n)!==!1&&vr(t.staleTime,n)!=="static"){const i=typeof s=="function"?s(n):s;return i==="always"||i!==!1&&ad(n,t)}return!1}function Hh(n,t,s,i){return(n!==t||Gt(i.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&ad(n,s)}function ad(n,t){return Gt(t.enabled,n)!==!1&&n.isStaleByTime(vr(t.staleTime,n))}function Q1(n,t){return!wc(n.getCurrentResult(),t)}function Qh(n){return{onFetch:(t,s)=>{var v,x,_,j,M;const i=t.options,a=(_=(x=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:x.fetchMore)==null?void 0:_.direction,u=((j=t.state.data)==null?void 0:j.pages)||[],d=((M=t.state.data)==null?void 0:M.pageParams)||[];let p={pages:[],pageParams:[]},h=0;const g=async()=>{let k=!1;const w=N=>{F1(N,()=>t.signal,()=>k=!0)},E=iy(t.options,t.fetchOptions),L=async(N,A,$)=>{if(k)return Promise.reject();if(A==null&&N.pages.length)return Promise.resolve(N);const G=(()=>{const be={client:t.client,queryKey:t.queryKey,pageParam:A,direction:$?"backward":"forward",meta:t.options.meta};return w(be),be})(),z=await E(G),{maxPages:oe}=t.options,ue=$?M1:D1;return{pages:ue(N.pages,z,oe),pageParams:ue(N.pageParams,A,oe)}};if(a&&u.length){const N=a==="backward",A=N?K1:Kh,$={pages:u,pageParams:d},V=A(i,$);p=await L($,V,N)}else{const N=n??u.length;do{const A=h===0?d[0]??i.initialPageParam:Kh(i,p);if(h>0&&A==null)break;p=await L(p,A),h++}while(h{var k,w;return(w=(k=t.options).persister)==null?void 0:w.call(k,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=g}}}function Kh(n,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?n.getNextPageParam(t[i],t,s[i],s):void 0}function K1(n,{pages:t,pageParams:s}){var i;return t.length>0?(i=n.getPreviousPageParam)==null?void 0:i.call(n,t[0],t,s[0],s):void 0}var no,yn,xt,Gr,vn,lr,tg,G1=(tg=class extends uy{constructor(t){super();he(this,vn);he(this,no);he(this,yn);he(this,xt);he(this,Gr);ee(this,no,t.client),this.mutationId=t.mutationId,ee(this,xt,t.mutationCache),ee(this,yn,[]),this.state=t.state||X1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,yn).includes(t)||(R(this,yn).push(t),this.clearGcTimeout(),R(this,xt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,yn,R(this,yn).filter(s=>s!==t)),this.scheduleGc(),R(this,xt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,yn).length||(this.state.status==="pending"?this.scheduleGc():R(this,xt).remove(this))}continue(){var t;return((t=R(this,Gr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,p,h,g,v,x,_,j,M,k,w,E,L,N,A,$,V,G;const s=()=>{Pe(this,vn,lr).call(this,{type:"continue"})},i={client:R(this,no),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Gr,ly({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(z,oe)=>{Pe(this,vn,lr).call(this,{type:"failed",failureCount:z,error:oe})},onPause:()=>{Pe(this,vn,lr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,xt).canRun(this)}));const a=this.state.status==="pending",u=!R(this,Gr).canStart();try{if(a)s();else{Pe(this,vn,lr).call(this,{type:"pending",variables:t,isPaused:u}),R(this,xt).config.onMutate&&await R(this,xt).config.onMutate(t,this,i);const oe=await((p=(d=this.options).onMutate)==null?void 0:p.call(d,t,i));oe!==this.state.context&&Pe(this,vn,lr).call(this,{type:"pending",context:oe,variables:t,isPaused:u})}const z=await R(this,Gr).start();return await((g=(h=R(this,xt).config).onSuccess)==null?void 0:g.call(h,z,t,this.state.context,this,i)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,z,t,this.state.context,i)),await((j=(_=R(this,xt).config).onSettled)==null?void 0:j.call(_,z,null,this.state.variables,this.state.context,this,i)),await((k=(M=this.options).onSettled)==null?void 0:k.call(M,z,null,t,this.state.context,i)),Pe(this,vn,lr).call(this,{type:"success",data:z}),z}catch(z){try{await((E=(w=R(this,xt).config).onError)==null?void 0:E.call(w,z,t,this.state.context,this,i))}catch(oe){Promise.reject(oe)}try{await((N=(L=this.options).onError)==null?void 0:N.call(L,z,t,this.state.context,i))}catch(oe){Promise.reject(oe)}try{await(($=(A=R(this,xt).config).onSettled)==null?void 0:$.call(A,void 0,z,this.state.variables,this.state.context,this,i))}catch(oe){Promise.reject(oe)}try{await((G=(V=this.options).onSettled)==null?void 0:G.call(V,void 0,z,t,this.state.context,i))}catch(oe){Promise.reject(oe)}throw Pe(this,vn,lr).call(this,{type:"error",error:z}),z}finally{R(this,xt).runNext(this)}}},no=new WeakMap,yn=new WeakMap,xt=new WeakMap,Gr=new WeakMap,vn=new WeakSet,lr=function(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ft.batch(()=>{R(this,yn).forEach(i=>{i.onMutationUpdate(t)}),R(this,xt).notify({mutation:this,type:"updated",action:t})})},tg);function X1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Dn,un,ro,ng,Y1=(ng=class extends io{constructor(t={}){super();he(this,Dn);he(this,un);he(this,ro);this.config=t,ee(this,Dn,new Set),ee(this,un,new Map),ee(this,ro,0)}build(t,s,i){const a=new G1({client:t,mutationCache:this,mutationId:++ba(this,ro)._,options:t.defaultMutationOptions(s),state:i});return this.add(a),a}add(t){R(this,Dn).add(t);const s=Ra(t);if(typeof s=="string"){const i=R(this,un).get(s);i?i.push(t):R(this,un).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Dn).delete(t)){const s=Ra(t);if(typeof s=="string"){const i=R(this,un).get(s);if(i)if(i.length>1){const a=i.indexOf(t);a!==-1&&i.splice(a,1)}else i[0]===t&&R(this,un).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Ra(t);if(typeof s=="string"){const i=R(this,un).get(s),a=i==null?void 0:i.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var i;const s=Ra(t);if(typeof s=="string"){const a=(i=R(this,un).get(s))==null?void 0:i.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ft.batch(()=>{R(this,Dn).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Dn).clear(),R(this,un).clear()})}getAll(){return Array.from(R(this,Dn))}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Uh(s,i))}findAll(t={}){return this.getAll().filter(s=>Uh(t,s))}notify(t){ft.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ft.batch(()=>Promise.all(t.map(s=>s.continue().catch(Ot))))}},Dn=new WeakMap,un=new WeakMap,ro=new WeakMap,ng);function Ra(n){var t;return(t=n.options.scope)==null?void 0:t.id}var xn,rg,J1=(rg=class extends io{constructor(t={}){super();he(this,xn);this.config=t,ee(this,xn,new Map)}build(t,s,i){const a=s.queryKey,u=s.queryHash??sd(a,s);let d=this.get(u);return d||(d=new q1({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:i,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){R(this,xn).has(t.queryHash)||(R(this,xn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=R(this,xn).get(t.queryHash);s&&(t.destroy(),s===t&&R(this,xn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ft.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,xn).get(t)}getAll(){return[...R(this,xn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Bh(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>Bh(t,i)):s}notify(t){ft.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ft.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ft.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xn=new WeakMap,rg),He,hr,mr,zs,$s,gr,Vs,qs,sg,Z1=(sg=class{constructor(n={}){he(this,He);he(this,hr);he(this,mr);he(this,zs);he(this,$s);he(this,gr);he(this,Vs);he(this,qs);ee(this,He,n.queryCache||new J1),ee(this,hr,n.mutationCache||new Y1),ee(this,mr,n.defaultOptions||{}),ee(this,zs,new Map),ee(this,$s,new Map),ee(this,gr,0)}mount(){ba(this,gr)._++,R(this,gr)===1&&(ee(this,Vs,od.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,He).onFocus())})),ee(this,qs,Va.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,He).onOnline())})))}unmount(){var n,t;ba(this,gr)._--,R(this,gr)===0&&((n=R(this,Vs))==null||n.call(this),ee(this,Vs,void 0),(t=R(this,qs))==null||t.call(this),ee(this,qs,void 0))}isFetching(n){return R(this,He).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return R(this,hr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,He).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const t=this.defaultQueryOptions(n),s=R(this,He).build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(vr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(n){return R(this,He).findAll(n).map(({queryKey:t,state:s})=>{const i=s.data;return[t,i]})}setQueryData(n,t,s){const i=this.defaultQueryOptions({queryKey:n}),a=R(this,He).get(i.queryHash),u=a==null?void 0:a.state.data,d=j1(t,u);if(d!==void 0)return R(this,He).build(this,i).setData(d,{...s,manual:!0})}setQueriesData(n,t,s){return ft.batch(()=>R(this,He).findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,He).get(t.queryHash))==null?void 0:s.state}removeQueries(n){const t=R(this,He);ft.batch(()=>{t.findAll(n).forEach(s=>{t.remove(s)})})}resetQueries(n,t){const s=R(this,He);return ft.batch(()=>(s.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},t)))}cancelQueries(n,t={}){const s={revert:!0,...t},i=ft.batch(()=>R(this,He).findAll(n).map(a=>a.cancel(s)));return Promise.all(i).then(Ot).catch(Ot)}invalidateQueries(n,t={}){return ft.batch(()=>(R(this,He).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},t)))}refetchQueries(n,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=ft.batch(()=>R(this,He).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(Ot)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(Ot)}fetchQuery(n){const t=this.defaultQueryOptions(n);t.retry===void 0&&(t.retry=!1);const s=R(this,He).build(this,t);return s.isStaleByTime(vr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ot).catch(Ot)}fetchInfiniteQuery(n){return n.behavior=Qh(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ot).catch(Ot)}ensureInfiniteQueryData(n){return n.behavior=Qh(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Va.isOnline()?R(this,hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,He)}getMutationCache(){return R(this,hr)}getDefaultOptions(){return R(this,mr)}setDefaultOptions(n){ee(this,mr,n)}setQueryDefaults(n,t){R(this,zs).set(Ki(n),{queryKey:n,defaultOptions:t})}getQueryDefaults(n){const t=[...R(this,zs).values()],s={};return t.forEach(i=>{Gi(n,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(n,t){R(this,$s).set(Ki(n),{mutationKey:n,defaultOptions:t})}getMutationDefaults(n){const t=[...R(this,$s).values()],s={};return t.forEach(i=>{Gi(n,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const t={...R(this,mr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return t.queryHash||(t.queryHash=sd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===id&&(t.enabled=!1),t}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...R(this,mr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){R(this,He).clear(),R(this,hr).clear()}},He=new WeakMap,hr=new WeakMap,mr=new WeakMap,zs=new WeakMap,$s=new WeakMap,gr=new WeakMap,Vs=new WeakMap,qs=new WeakMap,sg),fy=S.createContext(void 0),eb=n=>{const t=S.useContext(fy);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tb=({client:n,children:t})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),m.jsx(fy.Provider,{value:n,children:t})),py=S.createContext(!1),nb=()=>S.useContext(py);py.Provider;function rb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var sb=S.createContext(rb()),ib=()=>S.useContext(sb),ob=(n,t,s)=>{const i=s!=null&&s.state.error&&typeof n.throwOnError=="function"?oy(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||i)&&(t.isReset()||(n.retryOnMount=!1))},ab=n=>{S.useEffect(()=>{n.clearReset()},[n])},lb=({result:n,errorResetBoundary:t,throwOnError:s,query:i,suspense:a})=>n.isError&&!t.isReset()&&!n.isFetching&&i&&(a&&n.data===void 0||oy(s,[n.error,i])),ub=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...a)=>s(i(...a)):s(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},cb=(n,t)=>n.isLoading&&n.isFetching&&!t,db=(n,t)=>(n==null?void 0:n.suspense)&&t.isPending,Gh=(n,t,s)=>t.fetchOptimistic(n).catch(()=>{s.clearReset()});function fb(n,t,s){var _,j,M,k;const i=nb(),a=ib(),u=eb(),d=u.defaultQueryOptions(n);(j=(_=u.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||j.call(_,d);const p=u.getQueryCache().get(d.queryHash);d._optimisticResults=i?"isRestoring":"optimistic",ub(d),ob(d,a,p),ab(a);const h=!u.getQueryCache().get(d.queryHash),[g]=S.useState(()=>new t(u,d)),v=g.getOptimisticResult(d),x=!i&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(w=>{const E=x?g.subscribe(ft.batchCalls(w)):Ot;return g.updateResult(),E},[g,x]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),S.useEffect(()=>{g.setOptions(d)},[d,g]),db(d,v))throw Gh(d,g,a);if(lb({result:v,errorResetBoundary:a,throwOnError:d.throwOnError,query:p,suspense:d.suspense}))throw v.error;if((k=(M=u.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||k.call(M,d,v),d.experimental_prefetchInRender&&!es&&cb(v,i)){const w=h?Gh(d,g,a):p==null?void 0:p.promise;w==null||w.catch(Ot).finally(()=>{g.updateResult()})}return d.notifyOnChangeProps?v:g.trackResult(v)}function pb(n,t){return fb(n,W1)}const hb=new Z1({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Xi(){return Xi=Object.assign?Object.assign.bind():function(n){for(var t=1;t"u")throw new Error(t)}function ld(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gb(){return Math.random().toString(36).substr(2,8)}function Yh(n,t){return{usr:n.state,key:n.key,idx:t}}function jc(n,t,s,i){return s===void 0&&(s=null),Xi({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof t=="string"?Qs(t):t,{state:s,key:t&&t.key||i||gb()})}function qa(n){let{pathname:t="/",search:s="",hash:i=""}=n;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Qs(n){let t={};if(n){let s=n.indexOf("#");s>=0&&(t.hash=n.substr(s),n=n.substr(0,s));let i=n.indexOf("?");i>=0&&(t.search=n.substr(i),n=n.substr(0,i)),n&&(t.pathname=n)}return t}function yb(n,t,s,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:u=!1}=i,d=a.history,p=yr.Pop,h=null,g=v();g==null&&(g=0,d.replaceState(Xi({},d.state,{idx:g}),""));function v(){return(d.state||{idx:null}).idx}function x(){p=yr.Pop;let w=v(),E=w==null?null:w-g;g=w,h&&h({action:p,location:k.location,delta:E})}function _(w,E){p=yr.Push;let L=jc(k.location,w,E);g=v()+1;let N=Yh(L,g),A=k.createHref(L);try{d.pushState(N,"",A)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;a.location.assign(A)}u&&h&&h({action:p,location:k.location,delta:1})}function j(w,E){p=yr.Replace;let L=jc(k.location,w,E);g=v();let N=Yh(L,g),A=k.createHref(L);d.replaceState(N,"",A),u&&h&&h({action:p,location:k.location,delta:0})}function M(w){let E=a.location.origin!=="null"?a.location.origin:a.location.href,L=typeof w=="string"?w:qa(w);return L=L.replace(/ $/,"%20"),Je(E,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,E)}let k={get action(){return p},get location(){return n(a,d)},listen(w){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(Xh,x),h=w,()=>{a.removeEventListener(Xh,x),h=null}},createHref(w){return t(a,w)},createURL:M,encodeLocation(w){let E=M(w);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:_,replace:j,go(w){return d.go(w)}};return k}var Jh;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Jh||(Jh={}));function vb(n,t,s){return s===void 0&&(s="/"),xb(n,t,s)}function xb(n,t,s,i){let a=typeof t=="string"?Qs(t):t,u=ud(a.pathname||"/",s);if(u==null)return null;let d=hy(n);wb(d);let p=null,h=Ab(u);for(let g=0;p==null&&g{let h={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};h.relativePath.startsWith("/")&&(Je(h.relativePath.startsWith(i),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(i.length));let g=xr([i,h.relativePath]),v=s.concat(h);u.children&&u.children.length>0&&(Je(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),hy(u.children,t,v,g)),!(u.path==null&&!u.index)&&t.push({path:g,score:Rb(g,u.index),routesMeta:v})};return n.forEach((u,d)=>{var p;if(u.path===""||!((p=u.path)!=null&&p.includes("?")))a(u,d);else for(let h of my(u.path))a(u,d,h)}),t}function my(n){let t=n.split("/");if(t.length===0)return[];let[s,...i]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(i.length===0)return a?[u,""]:[u];let d=my(i.join("/")),p=[];return p.push(...d.map(h=>h===""?u:[u,h].join("/"))),a&&p.push(...d),p.map(h=>n.startsWith("/")&&h===""?"/":h)}function wb(n){n.sort((t,s)=>t.score!==s.score?s.score-t.score:Nb(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}const bb=/^:[\w-]+$/,Eb=3,Sb=2,_b=1,kb=10,Cb=-2,Zh=n=>n==="*";function Rb(n,t){let s=n.split("/"),i=s.length;return s.some(Zh)&&(i+=Cb),t&&(i+=Sb),s.filter(a=>!Zh(a)).reduce((a,u)=>a+(bb.test(u)?Eb:u===""?_b:kb),i)}function Nb(n,t){return n.length===t.length&&n.slice(0,-1).every((i,a)=>i===t[a])?n[n.length-1]-t[t.length-1]:0}function Tb(n,t,s){let{routesMeta:i}=n,a={},u="/",d=[];for(let p=0;p{let{paramName:_,isOptional:j}=v;if(_==="*"){let k=p[x]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const M=p[x];return j&&!M?g[_]=void 0:g[_]=(M||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Ob(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),ld(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],a="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,h)=>(i.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),a+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":n!==""&&n!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function Ab(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ld(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),n}}function ud(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}const jb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lb=n=>jb.test(n);function Ib(n,t){t===void 0&&(t="/");let{pathname:s,search:i="",hash:a=""}=typeof n=="string"?Qs(n):n,u;if(s)if(Lb(s))u=s;else{if(s.includes("//")){let d=s;s=vy(s),ld(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+s))}s.startsWith("/")?u=em(s.substring(1),"/"):u=em(s,t)}else u=t;return{pathname:u,search:Fb(i),hash:Bb(a)}}function em(n,t){let s=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function ec(n,t,s,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Db(n){return n.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function gy(n,t){let s=Db(n);return t?s.map((i,a)=>a===s.length-1?i.pathname:i.pathnameBase):s.map(i=>i.pathnameBase)}function yy(n,t,s,i){i===void 0&&(i=!1);let a;typeof n=="string"?a=Qs(n):(a=Xi({},n),Je(!a.pathname||!a.pathname.includes("?"),ec("?","pathname","search",a)),Je(!a.pathname||!a.pathname.includes("#"),ec("#","pathname","hash",a)),Je(!a.search||!a.search.includes("#"),ec("#","search","hash",a)));let u=n===""||a.pathname==="",d=u?"/":a.pathname,p;if(d==null)p=s;else{let x=t.length-1;if(!i&&d.startsWith("..")){let _=d.split("/");for(;_[0]==="..";)_.shift(),x-=1;a.pathname=_.join("/")}p=x>=0?t[x]:"/"}let h=Ib(a,p),g=d&&d!=="/"&&d.endsWith("/"),v=(u||d===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(g||v)&&(h.pathname+="/"),h}const vy=n=>n.replace(/\/\/+/g,"/"),xr=n=>vy(n.join("/")),Mb=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Fb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Bb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Ub(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const xy=["post","put","patch","delete"];new Set(xy);const zb=["get",...xy];new Set(zb);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Yi(){return Yi=Object.assign?Object.assign.bind():function(n){for(var t=1;t{p.current=!0}),S.useCallback(function(g,v){if(v===void 0&&(v={}),!p.current)return;if(typeof g=="number"){i.go(g);return}let x=yy(g,JSON.parse(d),u,v.relative==="path");n==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:xr([t,x.pathname])),(v.replace?i.replace:i.push)(x,v.state,v)},[t,i,d,u,n])}function Ey(n,t){let{relative:s}=t===void 0?{}:t,{future:i}=S.useContext(ss),{matches:a}=S.useContext(is),{pathname:u}=os(),d=JSON.stringify(gy(a,i.v7_relativeSplatPath));return S.useMemo(()=>yy(n,JSON.parse(d),u,s==="path"),[n,d,u,s])}function Qb(n,t){return Kb(n,t)}function Kb(n,t,s,i){ao()||Je(!1);let{navigator:a}=S.useContext(ss),{matches:u}=S.useContext(is),d=u[u.length-1],p=d?d.params:{};d&&d.pathname;let h=d?d.pathnameBase:"/";d&&d.route;let g=os(),v;if(t){var x;let w=typeof t=="string"?Qs(t):t;h==="/"||(x=w.pathname)!=null&&x.startsWith(h)||Je(!1),v=w}else v=g;let _=v.pathname||"/",j=_;if(h!=="/"){let w=h.replace(/^\//,"").split("/");j="/"+_.replace(/^\//,"").split("/").slice(w.length).join("/")}let M=vb(n,{pathname:j}),k=Zb(M&&M.map(w=>Object.assign({},w,{params:Object.assign({},p,w.params),pathname:xr([h,a.encodeLocation?a.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?h:xr([h,a.encodeLocation?a.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),u,s,i);return t&&k?S.createElement(oo.Provider,{value:{location:Yi({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:yr.Pop}},k):k}function Gb(){let n=rE(),t=Ub(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),s?S.createElement("pre",{style:a},s):null,null)}const Xb=S.createElement(Gb,null);class Yb extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?S.createElement(is.Provider,{value:this.props.routeContext},S.createElement(wy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Jb(n){let{routeContext:t,match:s,children:i}=n,a=S.useContext(cd);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(is.Provider,{value:t},i)}function Zb(n,t,s,i){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),i===void 0&&(i=null),n==null){var u;if(!s)return null;if(s.errors)n=s.matches;else if((u=i)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,p=(a=s)==null?void 0:a.errors;if(p!=null){let v=d.findIndex(x=>x.route.id&&(p==null?void 0:p[x.route.id])!==void 0);v>=0||Je(!1),d=d.slice(0,Math.min(d.length,v+1))}let h=!1,g=-1;if(s&&i&&i.v7_partialHydration)for(let v=0;v=0?d=d.slice(0,g+1):d=[d[0]];break}}}return d.reduceRight((v,x,_)=>{let j,M=!1,k=null,w=null;s&&(j=p&&x.route.id?p[x.route.id]:void 0,k=x.route.errorElement||Xb,h&&(g<0&&_===0?(iE("route-fallback"),M=!0,w=null):g===_&&(M=!0,w=x.route.hydrateFallbackElement||null)));let E=t.concat(d.slice(0,_+1)),L=()=>{let N;return j?N=k:M?N=w:x.route.Component?N=S.createElement(x.route.Component,null):x.route.element?N=x.route.element:N=v,S.createElement(Jb,{match:x,routeContext:{outlet:v,matches:E,isDataRoute:s!=null},children:N})};return s&&(x.route.ErrorBoundary||x.route.errorElement||_===0)?S.createElement(Yb,{location:s.location,revalidation:s.revalidation,component:k,error:j,children:L(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):L()},null)}var Sy=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(Sy||{}),_y=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(_y||{});function eE(n){let t=S.useContext(cd);return t||Je(!1),t}function tE(n){let t=S.useContext($b);return t||Je(!1),t}function nE(n){let t=S.useContext(is);return t||Je(!1),t}function ky(n){let t=nE(),s=t.matches[t.matches.length-1];return s.route.id||Je(!1),s.route.id}function rE(){var n;let t=S.useContext(wy),s=tE(),i=ky();return t!==void 0?t:(n=s.errors)==null?void 0:n[i]}function sE(){let{router:n}=eE(Sy.UseNavigateStable),t=ky(_y.UseNavigateStable),s=S.useRef(!1);return by(()=>{s.current=!0}),S.useCallback(function(a,u){u===void 0&&(u={}),s.current&&(typeof a=="number"?n.navigate(a):n.navigate(a,Yi({fromRouteId:t},u)))},[n,t])}const tm={};function iE(n,t,s){tm[n]||(tm[n]=!0)}function oE(n,t){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function La(n){Je(!1)}function aE(n){let{basename:t="/",children:s=null,location:i,navigationType:a=yr.Pop,navigator:u,static:d=!1,future:p}=n;ao()&&Je(!1);let h=t.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:h,navigator:u,static:d,future:Yi({v7_relativeSplatPath:!1},p)}),[h,p,u,d]);typeof i=="string"&&(i=Qs(i));let{pathname:v="/",search:x="",hash:_="",state:j=null,key:M="default"}=i,k=S.useMemo(()=>{let w=ud(v,h);return w==null?null:{location:{pathname:w,search:x,hash:_,state:j,key:M},navigationType:a}},[h,v,x,_,j,M,a]);return k==null?null:S.createElement(ss.Provider,{value:g},S.createElement(oo.Provider,{children:s,value:k}))}function lE(n){let{children:t,location:s}=n;return Qb(Lc(t),s)}new Promise(()=>{});function Lc(n,t){t===void 0&&(t=[]);let s=[];return S.Children.forEach(n,(i,a)=>{if(!S.isValidElement(i))return;let u=[...t,a];if(i.type===S.Fragment){s.push.apply(s,Lc(i.props.children,u));return}i.type!==La&&Je(!1),!i.props.index||!i.props.children||Je(!1);let d={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=Lc(i.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ic(){return Ic=Object.assign?Object.assign.bind():function(n){for(var t=1;t{g&&nm?nm(()=>h(x)):h(x)},[h,g]);return S.useLayoutEffect(()=>d.listen(v),[d,v]),S.useEffect(()=>oE(i),[i]),S.createElement(aE,{basename:t,children:s,location:p.location,navigationType:p.action,navigator:d,future:i})}const gE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ft=S.forwardRef(function(t,s){let{onClick:i,relative:a,reloadDocument:u,replace:d,state:p,target:h,to:g,preventScrollReset:v,viewTransition:x}=t,_=uE(t,fE),{basename:j}=S.useContext(ss),M,k=!1;if(typeof g=="string"&&yE.test(g)&&(M=g,gE))try{let N=new URL(window.location.href),A=g.startsWith("//")?new URL(N.protocol+g):new URL(g),$=ud(A.pathname,j);A.origin===N.origin&&$!=null?g=$+A.search+A.hash:k=!0}catch{}let w=Vb(g,{relative:a}),E=vE(g,{replace:d,state:p,target:h,preventScrollReset:v,relative:a,viewTransition:x});function L(N){i&&i(N),N.defaultPrevented||E(N)}return S.createElement("a",Ic({},_,{href:M||w,onClick:k||u?i:L,ref:s,target:h}))});var rm;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(rm||(rm={}));var sm;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(sm||(sm={}));function vE(n,t){let{target:s,replace:i,state:a,preventScrollReset:u,relative:d,viewTransition:p}=t===void 0?{}:t,h=Wb(),g=os(),v=Ey(n,{relative:d});return S.useCallback(x=>{if(dE(x,s)){x.preventDefault();let _=i!==void 0?i:qa(g)===qa(v);h(n,{replace:_,state:a,preventScrollReset:u,relative:d,viewTransition:p})}},[g,h,v,i,a,s,n,u,d,p])}function Cy(n,t){return function(){return n.apply(t,arguments)}}const{toString:xE}=Object.prototype,{getPrototypeOf:Ws}=Object,{iterator:lo,toStringTag:Ry}=Symbol,Wa=(({hasOwnProperty:n})=>(t,s)=>n.call(t,s))(Object.prototype),Ji=(n,t)=>{let s=n;const i=[];for(;s!=null&&s!==Object.prototype;){if(i.indexOf(s)!==-1)return!1;if(i.push(s),Wa(s,t))return!0;s=Ws(s)}return!1},wE=(n,t)=>n!=null&&Ji(n,t)?n[t]:void 0,dd=(n=>t=>{const s=xE.call(t);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),dn=n=>(n=n.toLowerCase(),t=>dd(t)===n),Ga=n=>t=>typeof t===n,{isArray:ts}=Array,Hs=Ga("undefined");function Ks(n){return n!==null&&!Hs(n)&&n.constructor!==null&&!Hs(n.constructor)&&At(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Ny=dn("ArrayBuffer");function bE(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Ny(n.buffer),t}const EE=Ga("string"),At=Ga("function"),Ty=Ga("number"),Gs=n=>n!==null&&typeof n=="object",SE=n=>n===!0||n===!1,Ia=n=>{if(!Gs(n))return!1;const t=Ws(n);return(t===null||t===Object.prototype||Ws(t)===null)&&!Ji(n,Ry)&&!Ji(n,lo)},_E=n=>{if(!Gs(n)||Ks(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},kE=dn("Date"),CE=dn("File"),RE=n=>!!(n&&typeof n.uri<"u"),NE=n=>n&&typeof n.getParts<"u",TE=dn("Blob"),PE=dn("FileList"),OE=n=>Gs(n)&&At(n.pipe);function AE(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const im=AE(),om=typeof im.FormData<"u"?im.FormData:void 0,jE=n=>{if(!n)return!1;if(om&&n instanceof om)return!0;const t=Ws(n);if(!t||t===Object.prototype||!At(n.append))return!1;const s=dd(n);return s==="formdata"||s==="object"&&At(n.toString)&&n.toString()==="[object FormData]"},LE=dn("URLSearchParams"),[IE,DE,ME,FE]=["ReadableStream","Request","Response","Headers"].map(dn),BE=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function uo(n,t,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let i,a;if(typeof n!="object"&&(n=[n]),ts(n))for(i=0,a=n.length;i0;)if(a=s[i],t===a.toLowerCase())return a;return null}const Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Oy=n=>!Hs(n)&&n!==Ur;function Dc(...n){const{caseless:t,skipUndefined:s}=Oy(this)&&this||{},i={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const p=t&&typeof d=="string"&&Py(i,d)||d,h=Wa(i,p)?i[p]:void 0;Ia(h)&&Ia(u)?i[p]=Dc(h,u):Ia(u)?i[p]=Dc({},u):ts(u)?i[p]=u.slice():(!s||!Hs(u))&&(i[p]=u)};for(let u=0,d=n.length;u(uo(t,(a,u)=>{s&&At(a)?Object.defineProperty(n,u,{__proto__:null,value:Cy(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),zE=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),$E=(n,t,s,i)=>{n.prototype=Object.create(t.prototype,i),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(n.prototype,s)},VE=(n,t,s,i)=>{let a,u,d;const p={};if(t=t||{},n==null)return t;do{for(a=Object.getOwnPropertyNames(n),u=a.length;u-- >0;)d=a[u],(!i||i(d,n,t))&&!p[d]&&(t[d]=n[d],p[d]=!0);n=s!==!1&&Ws(n)}while(n&&(!s||s(n,t))&&n!==Object.prototype);return t},qE=(n,t,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=t.length;const i=n.indexOf(t,s);return i!==-1&&i===s},WE=n=>{if(!n)return null;if(ts(n))return n;let t=n.length;if(!Ty(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=n[t];return s},HE=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Ws(Uint8Array)),QE=(n,t)=>{const i=(n&&n[lo]).call(n);let a;for(;(a=i.next())&&!a.done;){const u=a.value;t.call(n,u[0],u[1])}},KE=(n,t)=>{let s;const i=[];for(;(s=n.exec(t))!==null;)i.push(s);return i},GE=dn("HTMLFormElement"),XE=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,i,a){return i.toUpperCase()+a}),{propertyIsEnumerable:YE}=Object.prototype,JE=dn("RegExp"),Ay=(n,t)=>{const s=Object.getOwnPropertyDescriptors(n),i={};uo(s,(a,u)=>{let d;(d=t(a,u,n))!==!1&&(i[u]=d||a)}),Object.defineProperties(n,i)},ZE=n=>{Ay(n,(t,s)=>{if(At(n)&&["arguments","caller","callee"].includes(s))return!1;const i=n[s];if(At(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},eS=(n,t)=>{const s={},i=a=>{a.forEach(u=>{s[u]=!0})};return ts(n)?i(n):i(String(n).split(t)),s},tS=()=>{},nS=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function rS(n){return!!(n&&At(n.append)&&n[Ry]==="FormData"&&n[lo])}const sS=n=>{const t=new WeakSet,s=i=>{if(Gs(i)){if(t.has(i))return;if(Ks(i))return i;if(!("toJSON"in i)){t.add(i);const a=ts(i)?[]:{};return uo(i,(u,d)=>{const p=s(u);!Hs(p)&&(a[d]=p)}),t.delete(i),a}}return i};return s(n)},iS=dn("AsyncFunction"),oS=n=>n&&(Gs(n)||At(n))&&At(n.then)&&At(n.catch),jy=((n,t)=>n?setImmediate:t?((s,i)=>(Ur.addEventListener("message",({source:a,data:u})=>{a===Ur&&u===s&&i.length&&i.shift()()},!1),a=>{i.push(a),Ur.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",At(Ur.postMessage)),aS=typeof queueMicrotask<"u"?queueMicrotask.bind(Ur):typeof process<"u"&&process.nextTick||jy,Ly=n=>n!=null&&At(n[lo]),lS=n=>n!=null&&Ji(n,lo)&&Ly(n),O={isArray:ts,isArrayBuffer:Ny,isBuffer:Ks,isFormData:jE,isArrayBufferView:bE,isString:EE,isNumber:Ty,isBoolean:SE,isObject:Gs,isPlainObject:Ia,isEmptyObject:_E,isReadableStream:IE,isRequest:DE,isResponse:ME,isHeaders:FE,isUndefined:Hs,isDate:kE,isFile:CE,isReactNativeBlob:RE,isReactNative:NE,isBlob:TE,isRegExp:JE,isFunction:At,isStream:OE,isURLSearchParams:LE,isTypedArray:HE,isFileList:PE,forEach:uo,merge:Dc,extend:UE,trim:BE,stripBOM:zE,inherits:$E,toFlatObject:VE,kindOf:dd,kindOfTest:dn,endsWith:qE,toArray:WE,forEachEntry:QE,matchAll:KE,isHTMLForm:GE,hasOwnProperty:Wa,hasOwnProp:Wa,hasOwnInPrototypeChain:Ji,getSafeProp:wE,reduceDescriptors:Ay,freezeMethods:ZE,toObjectSet:eS,toCamelCase:XE,noop:tS,toFiniteNumber:nS,findKey:Py,global:Ur,isContextDefined:Oy,isSpecCompliantForm:rS,toJSONObject:sS,isAsyncFn:iS,isThenable:oS,setImmediate:jy,asap:aS,isIterable:Ly,isSafeIterable:lS},uS=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cS=n=>{const t={};let s,i,a;return n&&n.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),i=d.substring(a+1).trim(),!(!s||t[s]&&uS[s])&&(s==="set-cookie"?t[s]?t[s].push(i):t[s]=[i]:t[s]=t[s]?t[s]+", "+i:i)}),t};function dS(n){let t=0,s=n.length;for(;tt;){const i=n.charCodeAt(s-1);if(i!==9&&i!==32)break;s-=1}return t===0&&s===n.length?n:n.slice(t,s)}const fS=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),pS=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function fd(n,t){return O.isArray(n)?n.map(s=>fd(s,t)):dS(String(n).replace(t,""))}const hS=n=>fd(n,fS),mS=n=>fd(n,pS);function Iy(n){const t=Object.create(null);return O.forEach(n.toJSON(),(s,i)=>{t[i]=mS(s)}),t}const am=Symbol("internals");function Mi(n){return n&&String(n).trim().toLowerCase()}function Da(n){return n===!1||n==null?n:O.isArray(n)?n.map(Da):hS(String(n))}function gS(n){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=s.exec(n);)t[i[1]]=i[2];return t}const yS=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function tc(n,t,s,i,a){if(O.isFunction(i))return i.call(this,t,s);if(a&&(t=s),!!O.isString(t)){if(O.isString(i))return t.indexOf(i)!==-1;if(O.isRegExp(i))return i.test(t)}}function vS(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,i)=>s.toUpperCase()+i)}function xS(n,t){const s=O.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+s,{__proto__:null,value:function(a,u,d){return this[i].call(this,t,a,u,d)},configurable:!0})})}let wt=class{constructor(t){t&&this.set(t)}set(t,s,i){const a=this;function u(p,h,g){const v=Mi(h);if(!v)return;const x=O.findKey(a,v);(!x||a[x]===void 0||g===!0||g===void 0&&a[x]!==!1)&&(a[x||h]=Da(p))}const d=(p,h)=>O.forEach(p,(g,v)=>u(g,v,h));if(O.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(O.isString(t)&&(t=t.trim())&&!yS(t))d(cS(t),s);else if(O.isObject(t)&&O.isSafeIterable(t)){let p=Object.create(null),h,g;for(const v of t){if(!O.isArray(v))throw new TypeError("Object iterator must return a key-value pair");g=v[0],O.hasOwnProp(p,g)?(h=p[g],p[g]=O.isArray(h)?[...h,v[1]]:[h,v[1]]):p[g]=v[1]}d(p,s)}else t!=null&&u(s,t,i);return this}get(t,s){if(t=Mi(t),t){const i=O.findKey(this,t);if(i){const a=this[i];if(!s)return a;if(s===!0)return gS(a);if(O.isFunction(s))return s.call(this,a,i);if(O.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Mi(t),t){const i=O.findKey(this,t);return!!(i&&this[i]!==void 0&&(!s||tc(this,this[i],i,s)))}return!1}delete(t,s){const i=this;let a=!1;function u(d){if(d=Mi(d),d){const p=O.findKey(i,d);p&&(!s||tc(i,i[p],p,s))&&(delete i[p],a=!0)}}return O.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let i=s.length,a=!1;for(;i--;){const u=s[i];(!t||tc(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,i={};return O.forEach(this,(a,u)=>{const d=O.findKey(i,u);if(d){s[d]=Da(a),delete s[u];return}const p=t?vS(u):String(u).trim();p!==u&&delete s[u],s[p]=Da(a),i[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return O.forEach(this,(i,a)=>{i!=null&&i!==!1&&(s[a]=t&&O.isArray(i)?i.join(", "):i)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const i=new this(t);return s.forEach(a=>i.set(a)),i}static accessor(t){const i=(this[am]=this[am]={accessors:{}}).accessors,a=this.prototype;function u(d){const p=Mi(d);i[p]||(xS(a,d),i[p]=!0)}return O.isArray(t)?t.forEach(u):u(t),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(wt.prototype,({value:n},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(i){this[s]=i}}});O.freezeMethods(wt);const wS="[REDACTED ****]";function bS(n){if(O.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(O.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function ES(n,t){const s=new Set(t.map(u=>String(u).toLowerCase())),i=[],a=u=>{if(u===null||typeof u!="object"||O.isBuffer(u))return u;if(i.indexOf(u)!==-1)return;u instanceof wt&&(u=u.toJSON()),i.push(u);let d;if(O.isArray(u))d=[],u.forEach((p,h)=>{const g=a(p);O.isUndefined(g)||(d[h]=g)});else{if(!O.isPlainObject(u)&&bS(u))return i.pop(),u;d=Object.create(null);for(const[p,h]of Object.entries(u)){const g=s.has(p.toLowerCase())?wS:a(h);O.isUndefined(g)||(d[p]=g)}}return i.pop(),d};return a(n)}let Y=class Dy extends Error{static from(t,s,i,a,u,d){const p=new Dy(t.message,s||t.code,i,a,u);return Object.defineProperty(p,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),p.name=t.name,t.status!=null&&p.status==null&&(p.status=t.status),d&&Object.assign(p,d),p}constructor(t,s,i,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),i&&(this.config=i),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&O.hasOwnProp(t,"redact")?t.redact:void 0,i=O.isArray(s)&&s.length>0?ES(t,s):O.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:i,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Y.ERR_BAD_OPTION="ERR_BAD_OPTION";Y.ECONNABORTED="ECONNABORTED";Y.ETIMEDOUT="ETIMEDOUT";Y.ECONNREFUSED="ECONNREFUSED";Y.ERR_NETWORK="ERR_NETWORK";Y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Y.ERR_DEPRECATED="ERR_DEPRECATED";Y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Y.ERR_CANCELED="ERR_CANCELED";Y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Y.ERR_INVALID_URL="ERR_INVALID_URL";Y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const SS=null,My=100;function Mc(n){return O.isPlainObject(n)||O.isArray(n)}function Fy(n){return O.endsWith(n,"[]")?n.slice(0,-2):n}function nc(n,t,s){return n?n.concat(t).map(function(a,u){return a=Fy(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function _S(n){return O.isArray(n)&&!n.some(Mc)}const kS=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Xa(n,t,s){if(!O.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,s=O.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,N){return!O.isUndefined(N[L])});const i=s.metaTokens,a=s.visitor||M,u=s.dots,d=s.indexes,p=s.Blob||typeof Blob<"u"&&Blob,h=s.maxDepth===void 0?My:s.maxDepth,g=p&&O.isSpecCompliantForm(t),v=[];if(!O.isFunction(a))throw new TypeError("visitor must be a function");function x(E){if(E===null)return"";if(O.isDate(E))return E.toISOString();if(O.isBoolean(E))return E.toString();if(!g&&O.isBlob(E))throw new Y("Blob is not supported. Use a Buffer instead.");if(O.isArrayBuffer(E)||O.isTypedArray(E)){if(g&&typeof p=="function")return new p([E]);if(typeof Buffer<"u")return Buffer.from(E);throw new Y("Blob is not supported. Use a Buffer instead.",Y.ERR_NOT_SUPPORT)}return E}function _(E){if(E>h)throw new Y("Object is too deeply nested ("+E+" levels). Max depth: "+h,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function j(E,L){if(h===1/0)return JSON.stringify(E);const N=[];return JSON.stringify(E,function($,V){if(!O.isObject(V))return V;for(;N.length&&N[N.length-1]!==this;)N.pop();return N.push(V),_(L+N.length-1),V})}function M(E,L,N){let A=E;if(O.isReactNative(t)&&O.isReactNativeBlob(E))return t.append(nc(N,L,u),x(E)),!1;if(E&&!N&&typeof E=="object"){if(O.endsWith(L,"{}"))L=i?L:L.slice(0,-2),E=j(E,1);else if(O.isArray(E)&&_S(E)||(O.isFileList(E)||O.endsWith(L,"[]"))&&(A=O.toArray(E)))return L=Fy(L),A.forEach(function(V,G){!(O.isUndefined(V)||V===null)&&t.append(d===!0?nc([L],G,u):d===null?L:L+"[]",x(V))}),!1}return Mc(E)?!0:(t.append(nc(N,L,u),x(E)),!1)}const k=Object.assign(kS,{defaultVisitor:M,convertValue:x,isVisitable:Mc});function w(E,L,N=0){if(!O.isUndefined(E)){if(_(N),v.indexOf(E)!==-1)throw new Error("Circular reference detected in "+L.join("."));v.push(E),O.forEach(E,function($,V){(!(O.isUndefined($)||$===null)&&a.call(t,$,O.isString(V)?V.trim():V,L,k))===!0&&w($,L?L.concat(V):[V],N+1)}),v.pop()}}if(!O.isObject(n))throw new TypeError("data must be an object");return w(n),t}function lm(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(i){return t[i]})}function pd(n,t){this._pairs=[],n&&Xa(n,this,t)}const By=pd.prototype;By.append=function(t,s){this._pairs.push([t,s])};By.toString=function(t){const s=t?i=>t.call(this,i,lm):lm;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function CS(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Uy(n,t,s){if(!t)return n;n=n||"";const i=O.isFunction(s)?{serialize:s}:s,a=O.getSafeProp(i,"encode")||CS,u=O.getSafeProp(i,"serialize");let d;if(u?d=u(t,i):d=O.isURLSearchParams(t)?t.toString():new pd(t,i).toString(a),d){const p=n.indexOf("#");p!==-1&&(n=n.slice(0,p)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class um{constructor(){this.handlers=[]}use(t,s,i){return this.handlers.push({fulfilled:t,rejected:s,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(i){i!==null&&t(i)})}}const hd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},RS=typeof URLSearchParams<"u"?URLSearchParams:pd,NS=typeof FormData<"u"?FormData:null,TS=typeof Blob<"u"?Blob:null,PS={isBrowser:!0,classes:{URLSearchParams:RS,FormData:NS,Blob:TS},protocols:["http","https","file","blob","url","data"]},md=typeof window<"u"&&typeof document<"u",Fc=typeof navigator=="object"&&navigator||void 0,OS=md&&(!Fc||["ReactNative","NativeScript","NS"].indexOf(Fc.product)<0),AS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",jS=md&&window.location.href||"http://localhost",LS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:md,hasStandardBrowserEnv:OS,hasStandardBrowserWebWorkerEnv:AS,navigator:Fc,origin:jS},Symbol.toStringTag,{value:"Module"})),pt={...LS,...PS};function IS(n,t){return Xa(n,new pt.classes.URLSearchParams,{visitor:function(s,i,a,u){return pt.isNode&&O.isBuffer(s)?(this.append(i,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const cm=My;function zy(n){if(n>cm)throw new Y("FormData field is too deeply nested ("+n+" levels). Max depth: "+cm,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function DS(n){const t=[],s=/\w+|\[(\w*)]/g;let i;for(;(i=s.exec(n))!==null;)zy(t.length),t.push(i[0]==="[]"?"":i[1]||i[0]);return t}function MS(n){const t={},s=Object.keys(n);let i;const a=s.length;let u;for(i=0;i=s.length;return d=!d&&O.isArray(a)?a.length:d,h?(O.hasOwnProp(a,d)?a[d]=O.isArray(a[d])?a[d].concat(i):[a[d],i]:a[d]=i,!p):((!O.hasOwnProp(a,d)||!O.isObject(a[d]))&&(a[d]=[]),t(s,i,a[d],u)&&O.isArray(a[d])&&(a[d]=MS(a[d])),!p)}if(O.isFormData(n)&&O.isFunction(n.entries)){const s={};return O.forEachEntry(n,(i,a)=>{t(DS(i),a,s,0)}),s}return null}const Os=(n,t)=>n!=null&&O.hasOwnProp(n,t)?n[t]:void 0;function FS(n,t,s){if(O.isString(n))try{return(t||JSON.parse)(n),O.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(s||JSON.stringify)(n)}const co={transitional:hd,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const i=s.getContentType()||"",a=i.indexOf("application/json")>-1,u=O.isObject(t);if(u&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return a?JSON.stringify($y(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t)||O.isReadableStream(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let p;if(u){const h=Os(this,"formSerializer");if(i.indexOf("application/x-www-form-urlencoded")>-1)return IS(t,h).toString();if((p=O.isFileList(t))||i.indexOf("multipart/form-data")>-1){const g=Os(this,"env"),v=g&&g.FormData;return Xa(p?{"files[]":t}:t,v&&new v,h)}}return u||a?(s.setContentType("application/json",!1),FS(t)):t}],transformResponse:[function(t){const s=Os(this,"transitional")||co.transitional,i=s&&s.forcedJSONParsing,a=Os(this,"responseType"),u=a==="json";if(O.isResponse(t)||O.isReadableStream(t))return t;if(t&&O.isString(t)&&(i&&!a||u)){const p=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,Os(this,"parseReviver"))}catch(h){if(p)throw h.name==="SyntaxError"?Y.from(h,Y.ERR_BAD_RESPONSE,this,null,Os(this,"response")):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch","query"],n=>{co.headers[n]={}});function rc(n,t){const s=this||co,i=t||s,a=wt.from(i.headers);let u=i.data;return O.forEach(n,function(p){u=p.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function Vy(n){return!!(n&&n.__CANCEL__)}let fo=class extends Y{constructor(t,s,i){super(t??"canceled",Y.ERR_CANCELED,s,i),this.name="CanceledError",this.__CANCEL__=!0}};function qy(n,t,s){const i=s.config.validateStatus;!s.status||!i||i(s.status)?n(s):t(new Y("Request failed with status code "+s.status,s.status>=400&&s.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,s.config,s.request,s))}function BS(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function US(n,t){n=n||10;const s=new Array(n),i=new Array(n);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(h){const g=Date.now(),v=i[u];d||(d=g),s[a]=h,i[a]=g;let x=u,_=0;for(;x!==a;)_+=s[x++],x=x%n;if(a=(a+1)%n,a===u&&(u=(u+1)%n),g-d{s=v,a=null,u&&(clearTimeout(u),u=null),n(...g)};return[(...g)=>{const v=Date.now(),x=v-s;x>=i?d(g,v):(a=g,u||(u=setTimeout(()=>{u=null,d(a)},i-x)))},()=>a&&d(a)]}const Ha=(n,t,s=3)=>{let i=0;const a=US(50,250);return zS(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,p=u.lengthComputable?u.total:void 0,h=p!=null?Math.min(d,p):d,g=Math.max(0,h-i),v=a(g);i=Math.max(i,h);const x={loaded:h,total:p,progress:p?h/p:void 0,bytes:g,rate:v||void 0,estimated:v&&p?(p-h)/v:void 0,event:u,lengthComputable:p!=null,[t?"download":"upload"]:!0};n(x)},s)},dm=(n,t)=>{const s=n!=null;return[i=>t[0]({lengthComputable:s,total:n,loaded:i}),t[1]]},fm=n=>(...t)=>O.asap(()=>n(...t)),$S=pt.hasStandardBrowserEnv?((n,t)=>s=>(s=new URL(s,pt.origin),n.protocol===s.protocol&&n.host===s.host&&(t||n.port===s.port)))(new URL(pt.origin),pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent)):()=>!0,VS=pt.hasStandardBrowserEnv?{write(n,t,s,i,a,u,d){if(typeof document>"u")return;const p=[`${n}=${encodeURIComponent(t)}`];O.isNumber(s)&&p.push(`expires=${new Date(s).toUTCString()}`),O.isString(i)&&p.push(`path=${i}`),O.isString(a)&&p.push(`domain=${a}`),u===!0&&p.push("secure"),O.isString(d)&&p.push(`SameSite=${d}`),document.cookie=p.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sn instanceof wt?{...n}:n;function ns(n,t){n=n||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function i(v,x,_,j){return O.isPlainObject(v)&&O.isPlainObject(x)?O.merge.call({caseless:j},v,x):O.isPlainObject(x)?O.merge({},x):O.isArray(x)?x.slice():x}function a(v,x,_,j){if(O.isUndefined(x)){if(!O.isUndefined(v))return i(void 0,v,_,j)}else return i(v,x,_,j)}function u(v,x){if(!O.isUndefined(x))return i(void 0,x)}function d(v,x){if(O.isUndefined(x)){if(!O.isUndefined(v))return i(void 0,v)}else return i(void 0,x)}function p(v){const x=O.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!O.isUndefined(x))if(O.isPlainObject(x)){if(O.hasOwnProp(x,v))return x[v]}else return;const _=O.hasOwnProp(n,"transitional")?n.transitional:void 0;if(O.isPlainObject(_)&&O.hasOwnProp(_,v))return _[v]}function h(v,x,_){if(O.hasOwnProp(t,_))return i(v,x);if(O.hasOwnProp(n,_))return i(void 0,v)}const g={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:h,headers:(v,x,_)=>a(hm(v),hm(x),_,!0)};return O.forEach(Object.keys({...n,...t}),function(x){if(x==="__proto__"||x==="constructor"||x==="prototype")return;const _=O.hasOwnProp(g,x)?g[x]:a,j=O.hasOwnProp(n,x)?n[x]:void 0,M=O.hasOwnProp(t,x)?t[x]:void 0,k=_(j,M,x);O.isUndefined(k)&&_!==h||(s[x]=k)}),O.hasOwnProp(t,"validateStatus")&&O.isUndefined(t.validateStatus)&&p("validateStatusUndefinedResolves")===!1&&(O.hasOwnProp(n,"validateStatus")?s.validateStatus=i(void 0,n.validateStatus):delete s.validateStatus),s}const XS=["content-type","content-length"];function YS(n,t,s){if(s!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([i,a])=>{XS.includes(i.toLowerCase())&&n.set(i,a)})}const JS=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function Hy(n){const t=ns({},n),s=_=>O.hasOwnProp(t,_)?t[_]:void 0,i=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let p=s("headers");const h=s("auth"),g=s("baseURL"),v=s("allowAbsoluteUrls"),x=s("url");if(t.headers=p=wt.from(p),t.url=Uy(Wy(g,x,v,t),s("params"),s("paramsSerializer")),h){const _=O.getSafeProp(h,"username")||"",j=O.getSafeProp(h,"password")||"";try{p.set("Authorization","Basic "+btoa(_+":"+(j?JS(j):"")))}catch(M){throw Y.from(M,Y.ERR_BAD_OPTION_VALUE,n)}}if(O.isFormData(i)&&(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv||O.isReactNative(i)?p.setContentType(void 0):O.isFunction(i.getHeaders)&&YS(p,i.getHeaders(),s("formDataHeaderPolicy"))),pt.hasStandardBrowserEnv&&(O.isFunction(a)&&(a=a(t)),a===!0||a==null&&$S(t.url))){const j=u&&d&&VS.read(d);j&&p.set(u,j)}return t}const ZS=typeof XMLHttpRequest<"u",e_=ZS&&function(n){return new Promise(function(s,i){const a=Hy(n);let u=a.data;const d=wt.from(a.headers).normalize();let{responseType:p,onUploadProgress:h,onDownloadProgress:g}=a,v,x,_,j,M;function k(){j&&j(),M&&M(),a.cancelToken&&a.cancelToken.unsubscribe(v),a.signal&&a.signal.removeEventListener("abort",v)}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,!0),w.timeout=a.timeout;function E(){if(!w)return;const N=wt.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),$={data:!p||p==="text"||p==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:N,config:n,request:w};qy(function(G){s(G),k()},function(G){i(G),k()},$),w=null}"onloadend"in w?w.onloadend=E:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(E)},w.onabort=function(){w&&(i(new Y("Request aborted",Y.ECONNABORTED,n,w)),k(),w=null)},w.onerror=function(A){const $=A&&A.message?A.message:"Network Error",V=new Y($,Y.ERR_NETWORK,n,w);V.event=A||null,i(V),k(),w=null},w.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const $=a.transitional||hd;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),i(new Y(A,$.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,n,w)),k(),w=null},u===void 0&&d.setContentType(null),"setRequestHeader"in w&&O.forEach(Iy(d),function(A,$){w.setRequestHeader($,A)}),O.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),p&&p!=="json"&&(w.responseType=a.responseType),g&&([_,M]=Ha(g,!0),w.addEventListener("progress",_)),h&&w.upload&&([x,j]=Ha(h),w.upload.addEventListener("progress",x),w.upload.addEventListener("loadend",j)),(a.cancelToken||a.signal)&&(v=N=>{w&&(i(!N||N.type?new fo(null,n,w):N),w.abort(),k(),w=null)},a.cancelToken&&a.cancelToken.subscribe(v),a.signal&&(a.signal.aborted?v():a.signal.addEventListener("abort",v)));const L=BS(a.url);if(L&&!pt.protocols.includes(L)){i(new Y("Unsupported protocol "+L+":",Y.ERR_BAD_REQUEST,n)),k();return}w.send(u||null)})},t_=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const s=new AbortController;let i=!1;const a=function(h){if(!i){i=!0,d();const g=h instanceof Error?h:this.reason;s.abort(g instanceof Y?g:new fo(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,a(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t);const d=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),n=null)};n.forEach(h=>h.addEventListener("abort",a,{once:!0}));const{signal:p}=s;return p.unsubscribe=()=>O.asap(d),p},n_=function*(n,t){let s=n.byteLength;if(s{const a=r_(n,t);let u=0,d,p=h=>{d||(d=!0,i&&i(h))};return new ReadableStream({async pull(h){try{const{done:g,value:v}=await a.next();if(g){p(),h.close();return}let x=v.byteLength;if(s){let _=u+=x;s(_)}h.enqueue(new Uint8Array(v))}catch(g){throw p(g),g}},cancel(h){return p(h),a.return()}},{highWaterMark:2})},Qa=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,i_=(n,t,s)=>t+2j>=2&&i.charCodeAt(j-2)===37&&i.charCodeAt(j-1)===51&&(i.charCodeAt(j)===68||i.charCodeAt(j)===100);g>=0&&(i.charCodeAt(g)===61?(h++,g--):v(g)&&(h++,g-=3)),h===1&&g>=0&&(i.charCodeAt(g)===61||v(g))&&h++;const _=Math.floor(d/4)*3-(h||0);return _>0?_:0}let u=0;for(let d=0,p=i.length;d=55296&&h<=56319&&d+1=56320&&g<=57343?(u+=4,d++):u+=3}else u+=3}return u}const gd="1.18.1",gm=64*1024,{isFunction:Na}=O,a_=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),ym=n=>{if(!O.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},vm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},l_=n=>{const t=n.indexOf("://");let s=n;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},u_=n=>{const t=O.global!==void 0&&O.global!==null?O.global:globalThis,{ReadableStream:s,TextEncoder:i}=t;n=O.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:a,Request:u,Response:d}=n,p=a?Na(a):typeof fetch=="function",h=Na(u),g=Na(d);if(!p)return!1;const v=p&&Na(s),x=p&&(typeof i=="function"?(E=>L=>E.encode(L))(new i):async E=>new Uint8Array(await new u(E).arrayBuffer())),_=h&&v&&vm(()=>{let E=!1;const L=new u(pt.origin,{body:new s,method:"POST",get duplex(){return E=!0,"half"}}),N=L.headers.has("Content-Type");return L.body!=null&&L.body.cancel(),E&&!N}),j=g&&v&&vm(()=>O.isReadableStream(new d("").body)),M={stream:j&&(E=>E.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!M[E]&&(M[E]=(L,N)=>{let A=L&&L[E];if(A)return A.call(L);throw new Y(`Response type '${E}' is not supported`,Y.ERR_NOT_SUPPORT,N)})});const k=async E=>{if(E==null)return 0;if(O.isBlob(E))return E.size;if(O.isSpecCompliantForm(E))return(await new u(pt.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(O.isArrayBufferView(E)||O.isArrayBuffer(E))return E.byteLength;if(O.isURLSearchParams(E)&&(E=E+""),O.isString(E))return(await x(E)).byteLength},w=async(E,L)=>{const N=O.toFiniteNumber(E.getContentLength());return N??k(L)};return async E=>{let{url:L,method:N,data:A,signal:$,cancelToken:V,timeout:G,onDownloadProgress:z,onUploadProgress:oe,responseType:ue,headers:be,withCredentials:Te="same-origin",fetchOptions:we,maxContentLength:J,maxBodyLength:Se}=Hy(E);const Ee=O.isNumber(J)&&J>-1,_e=O.isNumber(Se)&&Se>-1,K=X=>O.hasOwnProp(E,X)?E[X]:void 0;let ae=a||fetch;ue=ue?(ue+"").toLowerCase():"text";let B=t_([$,V&&V.toAbortSignal()],G),P=null;const U=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let ce,me=null;const pe=()=>new Y("Request body larger than maxBodyLength limit",Y.ERR_BAD_REQUEST,E,P);try{let X;const ve=K("auth");if(ve){const xe=O.getSafeProp(ve,"username")||"",lt=O.getSafeProp(ve,"password")||"";X={username:xe,password:lt}}if(l_(L)){const xe=new URL(L,pt.origin);if(!X&&(xe.username||xe.password)){const lt=ym(xe.username),Jt=ym(xe.password);X={username:lt,password:Jt}}(xe.username||xe.password)&&(xe.username="",xe.password="",L=xe.href)}if(X&&(be.delete("authorization"),be.set("Authorization","Basic "+btoa(a_((X.username||"")+":"+(X.password||""))))),Ee&&typeof L=="string"&&L.startsWith("data:")&&o_(L)>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P);if(_e&&N!=="get"&&N!=="head"){const xe=await k(A);if(typeof xe=="number"&&isFinite(xe)&&(ce=xe,xe>Se))throw pe()}const Ne=_e&&(O.isReadableStream(A)||O.isStream(A)),ye=(xe,lt,Jt)=>mm(xe,gm,Zt=>{if(_e&&Zt>Se)throw me=pe();lt&<(Zt)},Jt);if(_&&N!=="get"&&N!=="head"&&(oe||Ne)){if(ce=ce??await w(be,A),ce!==0||Ne){let xe=new u(L,{method:"POST",body:A,duplex:"half"}),lt;if(O.isFormData(A)&&(lt=xe.headers.get("content-type"))&&be.setContentType(lt),xe.body){const[Jt,Zt]=oe&&dm(ce,Ha(fm(oe)))||[];A=ye(xe.body,Jt,Zt)}}}else if(Ne&&!h&&v&&N!=="get"&&N!=="head")A=ye(A);else if(Ne&&h&&!_&&N!=="get"&&N!=="head")throw new Y("Stream request bodies are not supported by the current fetch implementation",Y.ERR_NOT_SUPPORT,E,P);O.isString(Te)||(Te=Te?"include":"omit");const nt=h&&"credentials"in u.prototype;if(O.isFormData(A)){const xe=be.getContentType();xe&&/^multipart\/form-data/i.test(xe)&&!/boundary=/i.test(xe)&&be.delete("content-type")}be.set("User-Agent","axios/"+gd,!1);const Bt={...we,signal:B,method:N.toUpperCase(),headers:Iy(be.normalize()),body:A,duplex:"half",credentials:nt?Te:void 0};P=h&&new u(L,Bt);let at=await(h?ae(P,we):ae(L,Bt));const Yt=wt.from(at.headers);if(Ee){const xe=O.toFiniteNumber(Yt.getContentLength());if(xe!=null&&xe>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P)}const Ut=j&&(ue==="stream"||ue==="response");if(j&&at.body&&(z||Ee||Ut&&U)){const xe={};["status","statusText","headers"].forEach(Sn=>{xe[Sn]=at[Sn]});const lt=O.toFiniteNumber(Yt.getContentLength()),[Jt,Zt]=z&&dm(lt,Ha(fm(z),!0))||[];let Fn=0;const Bn=Sn=>{if(Ee&&(Fn=Sn,Fn>J))throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P);Jt&&Jt(Sn)};at=new d(mm(at.body,gm,Bn,()=>{Zt&&Zt(),U&&U()}),xe)}ue=ue||"text";let zt=await M[O.findKey(M,ue)||"text"](at,E);if(Ee&&!j&&!Ut){let xe;if(zt!=null&&(typeof zt.byteLength=="number"?xe=zt.byteLength:typeof zt.size=="number"?xe=zt.size:typeof zt=="string"&&(xe=typeof i=="function"?new i().encode(zt).byteLength:zt.length)),typeof xe=="number"&&xe>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,E,P)}return!Ut&&U&&U(),await new Promise((xe,lt)=>{qy(xe,lt,{data:zt,headers:wt.from(at.headers),status:at.status,statusText:at.statusText,config:E,request:P})})}catch(X){if(U&&U(),B&&B.aborted&&B.reason instanceof Y){const ve=B.reason;throw ve.config=E,P&&(ve.request=P),X!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw P&&!me.request&&(me.request=P),me;if(X instanceof Y)throw P&&!X.request&&(X.request=P),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const ve=new Y("Network Error",Y.ERR_NETWORK,E,P,X&&X.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),ve}throw Y.from(X,X&&X.code,E,P,X&&X.response)}}},c_=new Map,Qy=n=>{let t=n&&n.env||{};const{fetch:s,Request:i,Response:a}=t,u=[i,a,s];let d=u.length,p=d,h,g,v=c_;for(;p--;)h=u[p],g=v.get(h),g===void 0&&v.set(h,g=p?new Map:u_(t)),v=g;return g};Qy();const yd={http:SS,xhr:e_,fetch:{get:Qy}};O.forEach(yd,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const xm=n=>`- ${n}`,d_=n=>O.isFunction(n)||n===null||n===!1;function f_(n,t){n=O.isArray(n)?n:[n];const{length:s}=n;let i,a;const u={};for(let d=0;d`adapter ${h} `+(g===!1?"is not supported by the environment":"is not available in the build"));let p=s?d.length>1?`since : `+d.map(xm).join(` `):" "+xm(d[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+p,Y.ERR_NOT_SUPPORT)}return a}const Ky={getAdapter:f_,adapters:yd};function sc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new fo(null,n)}function wm(n){return sc(n),n.headers=wt.from(n.headers),n.data=rc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ky.getAdapter(n.adapter||co.adapter,n)(n).then(function(i){sc(n),n.response=i;try{i.data=rc.call(n,n.transformResponse,i)}finally{delete n.response}return i.headers=wt.from(i.headers),i},function(i){if(!Vy(i)&&(sc(n),i&&i.response)){n.response=i.response;try{i.response.data=rc.call(n,n.transformResponse,i.response)}finally{delete n.response}i.response.headers=wt.from(i.response.headers)}return Promise.reject(i)})}const Ya={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Ya[n]=function(i){return typeof i===n||"a"+(t<1?"n ":" ")+n}});const bm={};Ya.transitional=function(t,s,i){function a(u,d){return"[Axios v"+gd+"] Transitional option '"+u+"'"+d+(i?". "+i:"")}return(u,d,p)=>{if(t===!1)throw new Y(a(d," has been removed"+(s?" in "+s:"")),Y.ERR_DEPRECATED);return s&&!bm[d]&&(bm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,p):!0}};Ya.spelling=function(t){return(s,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function p_(n,t,s){if(typeof n!="object"||n===null)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let a=i.length;for(;a-- >0;){const u=i[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const p=n[u],h=p===void 0||d(p,u,n);if(h!==!0)throw new Y("option "+u+" must be "+h,Y.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new Y("Unknown option "+u,Y.ERR_BAD_OPTION)}}const Ma={assertOptions:p_,validators:Ya},vt=Ma.validators;let Xr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new um,response:new um}}async request(t,s){try{return await this._request(t,s)}catch(i){if(i instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!i.stack)i.stack=u;else if(u){const d=u.indexOf(` `),p=d===-1?-1:u.indexOf(` `,d+1),h=p===-1?"":u.slice(p+1);String(i.stack).endsWith(h)||(i.stack+=` `+u)}}catch{}}throw i}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=ns(this.defaults,s);const{transitional:i,paramsSerializer:a,headers:u}=s;i!==void 0&&Ma.assertOptions(i,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean),legacyInterceptorReqResOrdering:vt.transitional(vt.boolean),advertiseZstdAcceptEncoding:vt.transitional(vt.boolean),validateStatusUndefinedResolves:vt.transitional(vt.boolean)},!1),a!=null&&(O.isFunction(a)?s.paramsSerializer={serialize:a}:Ma.assertOptions(a,{encode:vt.function,serialize:vt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Ma.assertOptions(s,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&O.merge(u.common,u[s.method]);u&&O.forEach(["delete","get","head","post","put","patch","query","common"],M=>{delete u[M]}),s.headers=wt.concat(d,u);const p=[];let h=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(s)===!1)return;h=h&&k.synchronous;const w=s.transitional||hd;w&&w.legacyInterceptorReqResOrdering?p.unshift(k.fulfilled,k.rejected):p.push(k.fulfilled,k.rejected)});const g=[];this.interceptors.response.forEach(function(k){g.push(k.fulfilled,k.rejected)});let v,x=0,_;if(!h){const M=[wm.bind(this),void 0];for(M.unshift(...p),M.push(...g),_=M.length,v=Promise.resolve(s);x<_;)v=v.then(M[x++],M[x++]);return v}_=p.length;let j=s;for(;x<_;){const M=p[x++],k=p[x++];try{j=M(j)}catch(w){k.call(this,w);break}}try{v=wm.call(this,j)}catch(M){return Promise.reject(M)}for(x=0,_=g.length;x<_;)v=v.then(g[x++],g[x++]);return v}getUri(t){t=ns(this.defaults,t);const s=Wy(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Uy(s,t.params,t.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(t){Xr.prototype[t]=function(s,i){return this.request(ns(i||{},{method:t,url:s,data:i&&O.hasOwnProp(i,"data")?i.data:void 0}))}});O.forEach(["post","put","patch","query"],function(t){function s(i){return function(u,d,p){return this.request(ns(p||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}Xr.prototype[t]=s(),t!=="query"&&(Xr.prototype[t+"Form"]=s(!0))});let h_=class Gy{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(u){s=u});const i=this;this.promise.then(a=>{if(!i._listeners)return;let u=i._listeners.length;for(;u-- >0;)i._listeners[u](a);i._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(p=>{i.subscribe(p),u=p}).then(a);return d.cancel=function(){i.unsubscribe(u)},d},t(function(u,d,p){i.reason||(i.reason=new fo(u,d,p),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=i=>{t.abort(i)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Gy(function(a){t=a}),cancel:t}}};function m_(n){return function(s){return n.apply(null,s)}}function g_(n){return O.isObject(n)&&n.isAxiosError===!0}const Bc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bc).forEach(([n,t])=>{Bc[t]=n});function Xy(n){const t=new Xr(n),s=Cy(Xr.prototype.request,t);return O.extend(s,Xr.prototype,t,{allOwnKeys:!0}),O.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Xy(ns(n,a))},s}const Ge=Xy(co);Ge.Axios=Xr;Ge.CanceledError=fo;Ge.CancelToken=h_;Ge.isCancel=Vy;Ge.VERSION=gd;Ge.toFormData=Xa;Ge.AxiosError=Y;Ge.Cancel=Ge.CanceledError;Ge.all=function(t){return Promise.all(t)};Ge.spread=m_;Ge.isAxiosError=g_;Ge.mergeConfig=ns;Ge.AxiosHeaders=wt;Ge.formToJSON=n=>$y(O.isHTMLForm(n)?new FormData(n):n);Ge.getAdapter=Ky.getAdapter;Ge.HttpStatusCode=Bc;Ge.default=Ge;const{Axios:fR,AxiosError:pR,CanceledError:hR,isCancel:mR,CancelToken:gR,VERSION:yR,all:vR,Cancel:xR,isAxiosError:wR,spread:bR,toFormData:ER,AxiosHeaders:SR,HttpStatusCode:_R,formToJSON:kR,getAdapter:CR,mergeConfig:RR,create:NR}=Ge,Yy=typeof window>"u",Em=!Yy&&window.self!==window.top,y_=!Yy&&typeof document>"u",ic=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),dt=[];for(let n=0;n<256;++n)dt.push((n+256).toString(16).slice(1));function v_(n,t=0){return(dt[n[t+0]]+dt[n[t+1]]+dt[n[t+2]]+dt[n[t+3]]+"-"+dt[n[t+4]]+dt[n[t+5]]+"-"+dt[n[t+6]]+dt[n[t+7]]+"-"+dt[n[t+8]]+dt[n[t+9]]+"-"+dt[n[t+10]]+dt[n[t+11]]+dt[n[t+12]]+dt[n[t+13]]+dt[n[t+14]]+dt[n[t+15]]).toLowerCase()}let oc;const x_=new Uint8Array(16);function w_(){if(!oc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");oc=crypto.getRandomValues.bind(crypto)}return oc(x_)}const b_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sm={randomUUID:b_};function E_(n,t,s){var a;n=n||{};const i=n.random??((a=n.rng)==null?void 0:a.call(n))??w_();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,v_(i)}function S_(n,t,s){return Sm.randomUUID&&!n?Sm.randomUUID():E_(n)}const Fi=typeof window<"u"?window:{base44SharedInstances:{}};function __(n,t){return Fi.base44SharedInstances||(Fi.base44SharedInstances={}),Fi.base44SharedInstances[n]||(Fi.base44SharedInstances[n]={instance:t()}),Fi.base44SharedInstances[n].instance}const k_="__user_heartbeat_event__",C_="__initialization_event__",R_="__session_duration_event__",_m="analytics-enable",km="base44_analytics_session_id",N_={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},T_="analytics",Fe=__(T_,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...N_,...M_()}})),P_=({axiosClient:n,serverUrl:t,appId:s,userAuthModule:i})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:p}=Fe.config;if(!(!((a=Fe.config)===null||a===void 0)&&a.enabled)||y_)return{track:()=>{},cleanup:()=>{}};let h;const g=`${t}/api/apps/${s}/analytics/track/batch`,v=async N=>{await n.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:N}})},x=N=>{try{const A=JSON.stringify({events:N}),$=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(g,$)}catch{return!1}},_=async(N,A={})=>{if(N.length===0)return;const $=await D_(i),V=N.map(I_($));try{(!A.isBeacon||!x(V))&&await v(V)}catch{}},j=()=>{Rm(_,{throttleTime:d,batchSize:p})},M=N=>{if(Fe.requestsQueue.length>=u)return;const A=L_();Fe.requestsQueue.push({...N,...A}),j()},k=()=>{Rm(_,{throttleTime:d,batchSize:p}),h=Nm(M),A_()},w=()=>{Cm(),h==null||h(),j_(M);const N=Fe.requestsQueue.splice(0);_(N,{isBeacon:!0})},E=()=>{typeof window>"u"||(document.visibilityState==="hidden"?w():document.visibilityState==="visible"&&k())},L=()=>{Cm(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",E)};return j(),h=Nm(M),O_(M),typeof window<"u"&&window.addEventListener("visibilitychange",E),{track:M,cleanup:L}};function Cm(){Fe.isProcessing=!1}async function Rm(n,t){if(Fe.isProcessing)return;Fe.isProcessing=!0;const{throttleTime:s=1e3,batchSize:i=30}=t??{};for(;Fe.isProcessing&&Fe.requestsQueue.length>0;){const a=Fe.requestsQueue.splice(0,i);a.length&&await n(a),await new Promise(u=>setTimeout(u,s))}Fe.isProcessing=!1}function Nm(n){var t;if(Fe.isHeartBeatProcessing||((t=Fe.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Fe.isHeartBeatProcessing=!0;const s=setInterval(()=>{n({eventName:k_})},Fe.config.heartBeatInterval);return()=>{clearInterval(s),Fe.isHeartBeatProcessing=!1}}function O_(n){typeof window>"u"||Fe.wasInitializationTracked||(Fe.wasInitializationTracked=!0,n({eventName:C_,properties:{referrer:document==null?void 0:document.referrer}}))}function A_(){typeof window>"u"||Fe.sessionStartTime!==null||(Fe.sessionStartTime=new Date().toISOString())}function j_(n){if(typeof window>"u"||Fe.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Fe.sessionStartTime).getTime();Fe.sessionStartTime=null,n({eventName:R_,properties:{sessionDuration:t}})}function L_(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function I_(n){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...n})}let ac=null;async function D_(n){if(!Fe.sessionContext){if(!ac){const t=vd();ac=n.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Fe.sessionContext=await ac}return Fe.sessionContext}function M_(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(_m);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(_m);const i=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",i),{enabled:t==="true"}}function vd(){if(typeof window>"u")return ic();try{const n=localStorage.getItem(km);if(!n){const t=ic();return localStorage.setItem(km,t),t}return n}catch{return ic()}}class F_ extends Error{constructor(t,s,i,a,u){super(t),this.name="Base44Error",this.status=s,this.code=i,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function zi({baseURL:n,headers:t={},token:s,interceptResponses:i=!0,onError:a}){const u=Ge.create({baseURL:n,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",vd()));const p=S_();if(d.requestId=p,Em)try{window.parent.postMessage({type:"api-request-start",requestId:p,data:{url:n+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),i&&u.interceptors.response.use(d=>{var p;const h=(p=d.config)===null||p===void 0?void 0:p.requestId;try{Em&&h&&window.parent.postMessage({type:"api-request-end",requestId:h,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var p,h,g,v,x,_,j,M;const k=((h=(p=d.response)===null||p===void 0?void 0:p.data)===null||h===void 0?void 0:h.message)||((v=(g=d.response)===null||g===void 0?void 0:g.data)===null||v===void 0?void 0:v.detail)||d.message,w=new F_(k,(x=d.response)===null||x===void 0?void 0:x.status,(j=(_=d.response)===null||_===void 0?void 0:_.data)===null||j===void 0?void 0:j.code,(M=d.response)===null||M===void 0?void 0:M.data,d);return a==null||a(w),Promise.reject(w)}),u}function Tm(n){const{axios:t,appId:s,getSocket:i}=n;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return U_(t,s,u,i)}})}function B_(n){var t;try{const s=JSON.parse(n);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function U_(n,t,s,i){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,p,h){const g={};return u&&(g.sort=u),d&&(g.limit=d),p&&(g.skip=p),h&&(g.fields=Array.isArray(h)?h.join(","):h),n.get(a,{params:g})},async filter(u,d,p,h,g){const v={q:JSON.stringify(u)};return d&&(v.sort=d),p&&(v.limit=p),h&&(v.skip=h),g&&(v.fields=Array.isArray(g)?g.join(","):g),n.get(a,{params:v})},async get(u){return n.get(`${a}/${u}`)},async create(u){return n.post(a,u)},async update(u,d){return n.put(`${a}/${u}`,d)},async delete(u){return n.delete(`${a}/${u}`)},async deleteMany(u){return n.delete(a,{data:u})},async bulkCreate(u){return n.post(`${a}/bulk`,u)},async updateMany(u,d){return n.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return n.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),n.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return i().subscribeToRoom(d,{update_model:g=>{var v;const x=B_(g.data);if(x){x.type!=="delete"&&(!((v=x.data)===null||v===void 0)&&v._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${x.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${x.id}")\` to fetch the full record.`);try{u(x)}catch(_){console.error("[Base44 SDK] Subscription callback error:",_)}}}})}}}function z_(n,t){return{async call(s,i,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(i!=null&&i.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...p}=a??{},h={...p,...u&&{path_params:u},...d&&{query_params:d}};return await n.post(`/apps/${t}/integrations/custom/${s}/${i}`,h)}}}function Pm(n,t){const s=z_(n,t);return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async p=>{if(typeof p=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${p}`);let h,g;return p instanceof FormData||p&&Object.values(p).some(v=>v instanceof File)?(h=new FormData,Object.keys(p).forEach(v=>{p[v]instanceof File?h.append(v,p[v],p[v].name):typeof p[v]=="object"&&p[v]!==null?h.append(v,JSON.stringify(p[v])):h.append(v,p[v])}),g="multipart/form-data"):(h=p,g="application/json"),a==="Core"?n.post(`/apps/${t}/integration-endpoints/Core/${d}`,h||p,{headers:{"Content-Type":g}}):n.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,h||p,{headers:{"Content-Type":g}})}}})}})}function $_(){return typeof window>"u"?!1:window!==window.parent}function V_(n,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),p=window.open(n,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!p)return;const h=()=>{window.removeEventListener("message",g),clearInterval(v),p.closed||p.close()},g=x=>{var _;if(x.origin!==s||x.source!==p||!(!((_=x.data)===null||_===void 0)&&_.access_token))return;h();const j=new URL(t),{access_token:M,is_new_user:k}=x.data;j.searchParams.set("access_token",M),k!=null&&j.searchParams.set("is_new_user",String(k)),window.location.href=j.toString()},v=setInterval(()=>{p.closed&&h()},500);window.addEventListener("message",g)}function q_(n,t,s,i){return{async me(){return n.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return n.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${i.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),p=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let h;a==="sso"?h=`/apps/${s}/auth/sso/login`:h=`/apps/auth${a==="google"?"":`/${a}`}/login`;const g=`${i.appBaseUrl}/api${h}?${p}`;if($_()){const v=`${g}&popup_origin=${encodeURIComponent(window.location.origin)}`;return V_(v,d,window.location.origin)}window.location.href=g},logout(a){if(delete n.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(p){console.error("Failed to remove token from localStorage:",p)}const u=a||window.location.href,d=`${i.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(n.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var p;try{const h=await n.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:g,user:v}=h;return g&&this.setToken(g),{access_token:g,user:v}}catch(h){throw((p=h.response)===null||p===void 0?void 0:p.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return n.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return n.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return n.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return n.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return n.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return n.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return n.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function W_(n,t){return{async getAccessToken(s){const i=`/apps/${t}/auth/sso/accesstoken/${s}`;return n.get(i)},async getIdToken(s){const i=`/apps/${t}/auth/sso/idtoken/${s}`;return n.get(i)}}}function H_(n,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await n.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var i;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}},async getWorkspaceConnection(s){var i;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var i;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(i=u.connection_config)!==null&&i!==void 0?i:null}}}}function Q_(n,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await n.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Yr(n={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:i=!0,removeFromUrl:a=!0}=n;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(i&&K_(u,{storageKey:t}),a){d.delete(s);const p=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,p)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function K_(n,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!n)return!1;try{return window.localStorage.setItem(s,n),window.localStorage.setItem("token",n),!0}catch(i){return console.error("Error saving token to local storage:",i),!1}}function Om(n,t,s){const i=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const p=s.getAuthHeaders();Object.entries(p).forEach(([h,g])=>{g!=null&&d.set(h,String(g))})}return u&&new Headers(u).forEach((p,h)=>{d.set(h,p)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let p,h;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(p=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?p.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?p.append(g,JSON.stringify(d[g])):p.append(g,d[g])}),h="multipart/form-data"):(p=d,h="application/json"),n.post(`/apps/${t}/functions/${u}`,p||d,{headers:{"Content-Type":h}})},async fetch(u,d={}){const h=`/functions${u.startsWith("/")?u:`/${u}`}`,g=a(d.headers),v={...d,headers:g};return await fetch(i(s==null?void 0:s.baseURL,h),v)}}}function Am({axios:n,getSocket:t,appId:s,serverUrl:i,token:a}){const u=`/apps/${s}/agents`,d={},p=()=>n.get(`${u}/conversations`),h=k=>n.get(`${u}/conversations/${k}`);return{getConversations:p,getConversation:h,listConversations:k=>n.get(`${u}/conversations`,{params:k}),createConversation:k=>n.post(`${u}/conversations`,k),addMessage:async(k,w)=>n.post(`${u}/conversations/v2/${k.id}/messages`,w),subscribeToConversation:(k,w)=>{const E=`/agent-conversations/${k}`,L=t(),N=h(k).then(A=>(d[k]=A,A));return L.subscribeToRoom(E,{connect:()=>{},update_model:async({data:A})=>{const $=JSON.parse(A);if($._message){await N;const V=$._message,G=d[k];if(G){const z=G.messages||[],oe=z.findIndex(be=>be.id===V.id),ue=oe!==-1?z.map((be,Te)=>Te===oe?V:be):[...z,V];d[k]={...G,messages:ue},w==null||w(d[k])}}}})},getWhatsAppConnectURL:k=>{const w=`${i}/api/apps/${s}/agents/${encodeURIComponent(k)}/whatsapp`,E=a??Yr();return E?`${w}?token=${E}`:w},getTelegramConnectURL:k=>{const w=`${i}/api/apps/${s}/agents/${encodeURIComponent(k)}/telegram`,E=a??Yr();return E?`${w}?token=${E}`:w}}}function jm({serverUrl:n,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${n}/api/apps/${s}/ai/openai/v1`,token:(a=t??Yr())!==null&&a!==void 0?a:""}}}}function Lm(n,t){const s=`/app-logs/${t}`;return{async logUserInApp(i){await n.post(`${s}/log-user-in-app/${i}`)},async fetchLogs(i={}){return await n.get(s,{params:i})},async getStats(i={}){return await n.get(`${s}/stats`,{params:i})}}}function G_(n,t){return{async inviteUser(s,i){if(i!=="user"&&i!=="admin")throw new Error(`Invalid role: "${i}". Role must be either "user" or "admin".`);return await n.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:i})}}}const bn=Object.create(null);bn.open="0";bn.close="1";bn.ping="2";bn.pong="3";bn.message="4";bn.upgrade="5";bn.noop="6";const Fa=Object.create(null);Object.keys(bn).forEach(n=>{Fa[bn[n]]=n});const Uc={type:"error",data:"parser error"},Jy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Zy=typeof ArrayBuffer=="function",ev=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,xd=({type:n,data:t},s,i)=>Jy&&t instanceof Blob?s?i(t):Im(t,i):Zy&&(t instanceof ArrayBuffer||ev(t))?s?i(t):Im(new Blob([t]),i):i(bn[n]+(t||"")),Im=(n,t)=>{const s=new FileReader;return s.onload=function(){const i=s.result.split(",")[1];t("b"+(i||""))},s.readAsDataURL(n)};function Dm(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let lc;function X_(n,t){if(Jy&&n.data instanceof Blob)return n.data.arrayBuffer().then(Dm).then(t);if(Zy&&(n.data instanceof ArrayBuffer||ev(n.data)))return t(Dm(n.data));xd(n,!1,s=>{lc||(lc=new TextEncoder),t(lc.encode(s))})}const Mm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$i=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n{let t=n.length*.75,s=n.length,i,a=0,u,d,p,h;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const g=new ArrayBuffer(t),v=new Uint8Array(g);for(i=0;i>4,v[a++]=(d&15)<<4|p>>2,v[a++]=(p&3)<<6|h&63;return g},J_=typeof ArrayBuffer=="function",wd=(n,t)=>{if(typeof n!="string")return{type:"message",data:tv(n,t)};const s=n.charAt(0);return s==="b"?{type:"message",data:Z_(n.substring(1),t)}:Fa[s]?n.length>1?{type:Fa[s],data:n.substring(1)}:{type:Fa[s]}:Uc},Z_=(n,t)=>{if(J_){const s=Y_(n);return tv(s,t)}else return{base64:!0,data:n}},tv=(n,t)=>{switch(t){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},nv="",ek=(n,t)=>{const s=n.length,i=new Array(s);let a=0;n.forEach((u,d)=>{xd(u,!1,p=>{i[d]=p,++a===s&&t(i.join(nv))})})},tk=(n,t)=>{const s=n.split(nv),i=[];for(let a=0;a{const i=s.length;let a;if(i<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,i);else if(i<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,i)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(i))}n.data&&typeof n.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let uc;function Ta(n){return n.reduce((t,s)=>t+s.length,0)}function Pa(n,t){if(n[0].length===t)return n.shift();const s=new Uint8Array(t);let i=0;for(let a=0;aMath.pow(2,21)-1){p.enqueue(Uc);break}a=v*Math.pow(2,32)+g.getUint32(4),i=3}else{if(Ta(s)n){p.enqueue(Uc);break}}}})}const rv=4;function Ye(n){if(n)return sk(n)}function sk(n){for(var t in Ye.prototype)n[t]=Ye.prototype[t];return n}Ye.prototype.on=Ye.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};Ye.prototype.once=function(n,t){function s(){this.off(n,s),t.apply(this,arguments)}return s.fn=t,this.on(n,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var i,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Xt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),ik="arraybuffer";function sv(n,...t){return t.reduce((s,i)=>(n.hasOwnProperty(i)&&(s[i]=n[i]),s),{})}const ok=Xt.setTimeout,ak=Xt.clearTimeout;function Za(n,t){t.useNativeTimers?(n.setTimeoutFn=ok.bind(Xt),n.clearTimeoutFn=ak.bind(Xt)):(n.setTimeoutFn=Xt.setTimeout.bind(Xt),n.clearTimeoutFn=Xt.clearTimeout.bind(Xt))}const lk=1.33;function uk(n){return typeof n=="string"?ck(n):Math.ceil((n.byteLength||n.size)*lk)}function ck(n){let t=0,s=0;for(let i=0,a=n.length;i=57344?s+=3:(i++,s+=4);return s}function iv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function dk(n){let t="";for(let s in n)n.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return t}function fk(n){let t={},s=n.split("&");for(let i=0,a=s.length;i{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||s()})),this.writable||(i++,this.once("drain",function(){--i||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};tk(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,ek(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=iv()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let ov=!1;try{ov=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const mk=ov;function gk(){}class yk extends hk{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let i=location.port;i||(i=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,s){const i=this.request({method:"POST",data:t});i.on("success",s),i.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,i)=>{this.onError("xhr poll error",s,i)}),this.pollXhr=t}}class wn extends Ye{constructor(t,s,i){super(),this.createRequest=t,Za(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const s=sv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&i.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var a;i.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=wn.requestsCount++,wn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=gk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete wn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}wn.requestsCount=0;wn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Fm);else if(typeof addEventListener=="function"){const n="onpagehide"in Xt?"pagehide":"unload";addEventListener(n,Fm,!1)}}function Fm(){for(let n in wn.requests)wn.requests.hasOwnProperty(n)&&wn.requests[n].abort()}const vk=(function(){const n=av({xdomain:!1});return n&&n.responseType!==null})();class xk extends yk{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=vk&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new wn(av,this.uri(),t)}}function av(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||mk))return new XMLHttpRequest}catch{}if(!t)try{return new Xt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const lv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class wk extends bd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,i=lv?{}:sv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,i)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(i,u)}catch{}a&&Ja(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=iv()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const cc=Xt.WebSocket||Xt.MozWebSocket;class bk extends wk{createSocket(t,s,i){return lv?new cc(t,s,i):s?new cc(t,s):new cc(t)}doWrite(t,s){this.ws.send(s)}}class Ek extends bd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=rk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(s).getReader(),a=nk();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{i.read().then(({done:p,value:h})=>{p||(this.onPacket(h),u())}).catch(p=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&Ja(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Sk={websocket:bk,webtransport:Ek,polling:xk},_k=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,kk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zc(n){if(n.length>8e3)throw"URI too long";const t=n,s=n.indexOf("["),i=n.indexOf("]");s!=-1&&i!=-1&&(n=n.substring(0,s)+n.substring(s,i).replace(/:/g,";")+n.substring(i,n.length));let a=_k.exec(n||""),u={},d=14;for(;d--;)u[kk[d]]=a[d]||"";return s!=-1&&i!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=Ck(u,u.path),u.queryKey=Rk(u,u.query),u}function Ck(n,t){const s=/\/{2,9}/g,i=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function Rk(n,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,a,u){a&&(s[a]=u)}),s}const $c=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ba=[];$c&&addEventListener("offline",()=>{Ba.forEach(n=>n())},!1);class wr extends Ye{constructor(t,s){if(super(),this.binaryType=ik,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const i=zc(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=zc(s.host).host);Za(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{const a=i.prototype.name;this.transports.push(a),this._transportsByName[a]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=fk(this.opts.query)),$c&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ba.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=rv,s.transport=t,this.id&&(s.sid=this.id);const i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&wr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",wr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ja(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,a){if(typeof s=="function"&&(a=s,s=void 0),typeof i=="function"&&(a=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const u={type:t,data:s,options:i};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(wr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),$c&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=Ba.indexOf(this._offlineEventListener);i!==-1&&Ba.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}wr.protocol=rv;class Nk extends wr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{i||(s.send([{type:"ping",data:"probe"}]),s.once("packet",x=>{if(!i)if(x.type==="pong"&&x.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;wr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(v(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const _=new Error("probe error");_.transport=s.name,this.emitReserved("upgradeError",_)}}))};function u(){i||(i=!0,v(),s.close(),s=null)}const d=x=>{const _=new Error("probe error: "+x);_.transport=s.name,u(),this.emitReserved("upgradeError",_)};function p(){d("transport closed")}function h(){d("socket closed")}function g(x){s&&x.name!==s.name&&u()}const v=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",p),this.off("close",h),this.off("upgrading",g)};s.once("open",a),s.once("error",d),s.once("close",p),this.once("close",h),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let i=0;iSk[u]).filter(u=>!!u)),super(i?a:t,a)}};function Pk(n,t="",s){let i=n;s=s||typeof location<"u"&&location,n==null&&(n=s.protocol+"//"+s.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=s.protocol+n:n=s.host+n),/^(https?|wss?):\/\//.test(n)||(typeof s<"u"?n=s.protocol+"//"+n:n="https://"+n),i=zc(n)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const u=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+u+":"+i.port+t,i.href=i.protocol+"://"+u+(s&&s.port===i.port?"":":"+i.port),i}const Ok=typeof ArrayBuffer=="function",Ak=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,uv=Object.prototype.toString,jk=typeof Blob=="function"||typeof Blob<"u"&&uv.call(Blob)==="[object BlobConstructor]",Lk=typeof File=="function"||typeof File<"u"&&uv.call(File)==="[object FileConstructor]";function Ed(n){return Ok&&(n instanceof ArrayBuffer||Ak(n))||jk&&n instanceof Blob||Lk&&n instanceof File}function Ua(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let s=0,i=n.length;s=0&&n.numthis.opts.maxAttachments)throw new Error("too many attachments");i.attachments=p}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););i.nsp=t.substring(u,s)}else i.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}i.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(Sd.isPayloadValid(i.type,u))i.data=u;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Ae.CONNECT:return Bm(s);case Ae.DISCONNECT:return s===void 0;case Ae.CONNECT_ERROR:return typeof s=="string"||Bm(s);case Ae.EVENT:case Ae.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&Mk.indexOf(s[0])===-1);case Ae.ACK:case Ae.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Bk{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Dk(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Uk=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function Bm(n){return Object.prototype.toString.call(n)==="[object Object]"}const zk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sd,Encoder:Fk,get PacketType(){return Ae}},Symbol.toStringTag,{value:"Module"}));function cn(n,t,s){return n.on(t,s),function(){n.off(t,s)}}const $k=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class cv extends Ye{constructor(t,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[cn(t,"open",this.onopen.bind(this)),cn(t,"packet",this.onpacket.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var i,a,u;if($k.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Ae.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const v=this.ids++,x=s.pop();this._registerAckCallback(v,x),d.id=v}const p=(a=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||a===void 0?void 0:a.writable,h=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!p||(h?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var i;const a=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let p=0;p{this.io.clearTimeoutFn(u),s.apply(this,p)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((i,a)=>{const u=(d,p)=>d?a(d):i(p);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ae.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ae.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ae.EVENT:case Ae.BINARY_EVENT:this.onevent(t);break;case Ae.ACK:case Ae.BINARY_ACK:this.onack(t);break;case Ae.DISCONNECT:this.ondisconnect();break;case Ae.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const i of s)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let i=!1;return function(...a){i||(i=!0,s.packet({type:Ae.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ae.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let i=0;i0&&n.jitter<=1?n.jitter:0,this.attempts=0}Xs.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-s:n+s}return Math.min(n,this.max)|0};Xs.prototype.reset=function(){this.attempts=0};Xs.prototype.setMin=function(n){this.ms=n};Xs.prototype.setMax=function(n){this.max=n};Xs.prototype.setJitter=function(n){this.jitter=n};class Wc extends Ye{constructor(t,s){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Za(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((i=s.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new Xs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||zk;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Tk(this.uri,this.opts);const s=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const a=cn(s,"open",function(){i.onopen(),t&&t()}),u=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),t?t(p):this.maybeReconnectOnOpen()},d=cn(s,"error",u);if(this._timeout!==!1){const p=this._timeout,h=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},p);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(cn(t,"ping",this.onping.bind(this)),cn(t,"data",this.ondata.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Ja(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new cv(this,t,s),this.nsps[t]=i),i}_destroy(t){const s=Object.keys(this.nsps);for(const i of s)if(this.nsps[i].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let i=0;it()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Bi={};function za(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const s=Pk(n,t.path||"/socket.io"),i=s.source,a=s.id,u=s.path,d=Bi[a]&&u in Bi[a].nsps,p=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let h;return p?h=new Wc(i,t):(Bi[a]||(Bi[a]=new Wc(i,t)),h=Bi[a]),s.query&&!t.query&&(t.query=s.queryKey),h.socket(s.path,t)}Object.assign(za,{Manager:Wc,Socket:cv,io:za,connect:za});const Vk=250;function Um(n,t){var s;const i=(s=n.token)!==null&&s!==void 0?s:Yr(),a={app_id:n.appId,token:i};i||(a.anonymous_id=vd());const u=za(n.serverUrl,{path:n.mountPath,transports:n.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var p;return(p=t.update_model)===null||p===void 0?void 0:p.call(t,d)}),u.on("error",async d=>{var p;return(p=t.error)===null||p===void 0?void 0:p.call(t,d)}),u.on("connect_error",async d=>{var p;return console.error("connect_error",d),(p=t.error)===null||p===void 0?void 0:p.call(t,d)}),u}function qk({config:n}){let t={...n};const s={},i={},a={connect:async()=>{const E=[];Object.keys(s).forEach(L=>{const N=_(L);N.length!==0&&(g(L),N.forEach(({connect:A})=>{const $=async()=>A==null?void 0:A();E.push($())}))}),await Promise.all(E)},update_model:async E=>{const N=_(E.room).map(A=>{var $;return($=A.update_model)===null||$===void 0?void 0:$.call(A,E)});await Promise.all(N)},error:async E=>{console.error("error",E);const L=Object.values(s).flat().map(N=>{var A;return(A=N.error)===null||A===void 0?void 0:A.call(N,E)});await Promise.all(L)}};let u=Um(n,a);function d(){p()}function p(){M(),u&&u.disconnect()}function h(E){d(),t={...t,...E},u=Um(t,a)}function g(E){u.emit("join",E)}function v(E){u.emit("leave",E)}async function x(E,L){var N;const A=JSON.stringify(L);return(N=a.update_model)===null||N===void 0?void 0:N.call(a,{room:E,data:A})}function _(E){var L;return(L=s[E])!==null&&L!==void 0?L:[]}function j(E){const L=i[E];L&&(clearTimeout(L),delete i[E])}function M(){Object.keys(i).forEach(E=>{var L,N;clearTimeout(i[E]),delete i[E],((N=(L=s[E])===null||L===void 0?void 0:L.length)!==null&&N!==void 0?N:0)===0&&delete s[E]})}function k(E){j(E),i[E]=setTimeout(()=>{var L,N;delete i[E],!(((N=(L=s[E])===null||L===void 0?void 0:L.length)!==null&&N!==void 0?N:0)>0)&&(v(E),delete s[E])},Vk)}return{socket:u,subscribeToRoom:(E,L)=>{s[E]?j(E):(g(E),s[E]=[]),s[E].push(L);let N=!1;return()=>{var A,$;N||(N=!0,s[E]=($=(A=s[E])===null||A===void 0?void 0:A.filter(V=>V!==L))!==null&&$!==void 0?$:[],s[E].length===0&&k(E))}},updateConfig:h,updateModel:x,disconnect:p}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var dv=class extends Event{constructor(t,s){super("error",s);Ie(this,"message");Ie(this,"error");this.message=t.message,this.error=t}},fv=class extends Event{constructor(t=1e3,s="",i){super("close",i);Ie(this,"code");Ie(this,"reason");Ie(this,"wasClean",!0);this.code=t,this.reason=s}},dc={Event,ErrorEvent:dv,CloseEvent:fv};function Wk(n,t){if(!n)throw new Error(t)}function Hk(n){return new n.constructor(n.type,n)}function Qk(n){return"data"in n?new MessageEvent(n.type,n):"code"in n||"reason"in n?new fv(n.code||1999,n.reason||"unknown reason",n):"error"in n?new dv(n.error,n):new Event(n.type,n)}var ig,Kk=typeof process<"u"&&typeof((ig=process.versions)==null?void 0:ig.node)<"u"&&typeof document>"u",Oa=Kk?Qk:Hk,Mr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},zm=!1,Gk=class Fr extends EventTarget{constructor(s,i,a={}){super();Ie(this,"_ws");Ie(this,"_retryCount",-1);Ie(this,"_uptimeTimeout");Ie(this,"_connectTimeout");Ie(this,"_shouldReconnect",!0);Ie(this,"_connectLock",!1);Ie(this,"_binaryType","blob");Ie(this,"_closeCalled",!1);Ie(this,"_messageQueue",[]);Ie(this,"_url");Ie(this,"_protocols");Ie(this,"_options");Ie(this,"onclose",null);Ie(this,"onerror",null);Ie(this,"onmessage",null);Ie(this,"onopen",null);Ie(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:i=Mr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),i),Wk(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(Oa(s))});Ie(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(Oa(s))});Ie(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(Oa(s)),this._connect()});Ie(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(Oa(s))});this._url=s,this._protocols=i,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Fr.CONNECTING}get OPEN(){return Fr.OPEN}get CLOSING(){return Fr.CLOSING}get CLOSED(){return Fr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((i,a)=>(typeof a=="string"?i+=a.length:a instanceof Blob?i+=a.size:i+=a.byteLength,i),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Fr.CLOSED:Fr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,i){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,i)}reconnect(s,i){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,i),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:i=Mr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Mr.reconnectionDelayGrowFactor,minReconnectionDelay:i=Mr.minReconnectionDelay,maxReconnectionDelay:a=Mr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=i*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const i=s();if(!i)return Promise.resolve(null);if(typeof i=="string"||Array.isArray(i))return Promise.resolve(i);if(i.then)return i}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const i=s();if(typeof i=="string")return Promise.resolve(i);if(i.then)return i}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Mr.maxRetries,connectionTimeout:i=Mr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!zm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),zm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),i)}).catch(a=>{this._connectLock=!1,this._handleError(new dc.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new dc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,i){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,i),this._handleClose(new dc.CloseEvent(s,i,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var Xk=n=>n[1]!==null&&n[1]!==void 0;function Yk(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let n=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let i=Math.random()*16;return n>0?(i=(n+i)%16|0,n=Math.floor(n/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),(s==="x"?i:i&3|8).toString(16)})}function pv(n,t,s={}){const{host:i,path:a,protocol:u,room:d,party:p,query:h}=n;let g=i.replace(/^(http|https|ws|wss):\/\//,"");if(g.endsWith("/")&&(g=g.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const v=p??"main",x=a?`/${a}`:"",_=u||(g.startsWith("localhost:")||g.startsWith("127.0.0.1:")||g.startsWith("192.168.")||g.startsWith("10.")||g.startsWith("172.")&&g.split(".")[1]>="16"&&g.split(".")[1]<="31"||g.startsWith("[::ffff:7f00:1]:")?t:t+"s"),j=`${_}://${g}/${p?`parties/${p}`:"party"}/${d}${x}`,M=(w={})=>`${j}?${new URLSearchParams([...Object.entries(s),...Object.entries(w).filter(Xk)])}`,k=typeof h=="function"?async()=>M(await h()):M(h);return{host:g,path:x,room:d,name:v,protocol:_,partyUrl:j,urlProvider:k}}var Jk=class extends Gk{constructor(t){const s=$m(t);super(s.urlProvider,s.protocols,s.socketOptions);Ie(this,"_pk");Ie(this,"_pkurl");Ie(this,"name");Ie(this,"room");Ie(this,"host");Ie(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=$m({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:i,name:a,room:u,host:d,path:p}=t;this._pk=s,this._pkurl=i,this.name=a,this.room=u,this.host=d,this.path=p}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const i=pv(t,"http"),a=typeof i.urlProvider=="string"?i.urlProvider:await i.urlProvider();return(t.fetch??fetch)(a,s)}};function $m(n){const{id:t,host:s,path:i,party:a,room:u,protocol:d,query:p,protocols:h,...g}=n,v=t||Yk(),x=pv(n,"ws",{_pk:v});return{_pk:v,_pkurl:x.partyUrl,name:x.name,room:x.room,host:x.host,path:x.path,protocols:h,socketOptions:g,urlProvider:x.urlProvider}}const Zk=1e3,eC=3e3;class tC{constructor(t,s,i,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const p=new Jk({host:i.host,party:t,room:s,id:this.id,query:()=>{const v=i.getAuthToken();return{app_id:i.appId,handler:t,...v?{token:v}:{},...i.functionsVersion?{fv:i.functionsVersion}:{}}}});this.ws=p;let h=Date.now();const g=()=>{h=Date.now()};p.addEventListener("open",g),p.addEventListener("message",v=>{g();let x;try{x=JSON.parse(v.data)}catch{return}if((x&&typeof x=="object"?x.type:void 0)!=="__pong")for(const j of this.listeners)j(x)}),this.heartbeat=setInterval(()=>{if(Date.now()-h>eC){g(),p.reconnect();return}try{p.send(JSON.stringify({type:"__ping"}))}catch{}},Zk)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function nC(n,t,s,i){let a=null;return{connect(u){if(a)return a;const d=new tC(n,t,s,u,()=>{i.delete(d),a===d&&(a=null)});return a=d,i.add(d),d}}}function rC(n,t){return n&&!n.startsWith("/")?n:t??n}function sC(n){const t=new Set;return{module:new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"))return u=>nC(a,u,n,t)}}),closeAll:()=>{for(const i of[...t])i.close()}}}function iC(n){var t,s,i;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:p,requiresAuth:h=!1,appBaseUrl:g,options:v,functionsVersion:x,headers:_}=n,j=typeof g=="string"?g:"",M={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let k=null;const w=()=>(k||(k=qk({config:M})),k),E={..._,"X-App-Id":String(u)},L=x?{...E,"Base44-Functions-Version":x}:E,N=zi({baseURL:`${a}/api`,headers:E,token:d,onError:v==null?void 0:v.onError}),A=zi({baseURL:`${a}/api`,headers:L,token:d,interceptResponses:!1,onError:v==null?void 0:v.onError}),$={...E,...d?{"on-behalf-of":`Bearer ${d}`}:{}},V=zi({baseURL:`${a}/api`,headers:$,token:p,onError:v==null?void 0:v.onError}),G=zi({baseURL:`${a}/api`,headers:L,token:p,interceptResponses:!1}),z=q_(N,A,u,{appBaseUrl:j});if(typeof window<"u"){const we=d||Yr();we&&z.setToken(we)}const oe=sC({appId:u,host:rC(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:x,getAuthToken:()=>d||Yr()}),ue={entities:Tm({axios:N,appId:u,getSocket:w}),integrations:Pm(N,u),connectors:Q_(N,u),auth:z,functions:Om(A,u,{getAuthHeaders:()=>{const we={},J=d||Yr();return J&&(we.Authorization=`Bearer ${J}`),we},baseURL:(s=A.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Am({axios:N,getSocket:w,appId:u,serverUrl:a,token:d}),aiGateway:jm({serverUrl:a,token:d,appId:u}),appLogs:Lm(N,u),users:G_(N,u),analytics:P_({axiosClient:N,serverUrl:a,appId:u,userAuthModule:z}),actors:oe.module,cleanup:()=>{ue.analytics.cleanup(),oe.closeAll(),k&&k.disconnect()}},be={entities:Tm({axios:V,appId:u,getSocket:w}),integrations:Pm(V,u),sso:W_(V,u),connectors:H_(V,u),functions:Om(G,u,{getAuthHeaders:()=>{const we={};return p&&(we.Authorization=`Bearer ${p}`),we},baseURL:(i=G.defaults)===null||i===void 0?void 0:i.baseURL}),agents:Am({axios:V,getSocket:w,appId:u,serverUrl:a,token:d}),aiGateway:jm({serverUrl:a,token:p,appId:u}),appLogs:Lm(V,u),cleanup:()=>{k&&k.disconnect()}};return h&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(we){console.error("Authentication check failed:",we),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(we){ue.auth.setToken(we),k&&k.updateConfig({token:we}),M.token=we},getConfig(){return{serverUrl:a,appId:u,requiresAuth:h}},get asServiceRole(){if(!p)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return be}}}const hv=typeof window>"u",oC=hv?{localStorage:new Map}:window,Hi=oC.localStorage,aC=n=>n.replace(/([A-Z])/g,"_$1").toLowerCase(),As=(n,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(hv)return t;const i=`base44_${aC(n)}`,a=new URLSearchParams(window.location.search),u=a.get(n);if(s){a.delete(n);const p=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,p)}if(u)return Hi.setItem(i,u),u;if(t)return Hi.setItem(i,t),t;const d=Hi.getItem(i);return d||null},lC=()=>(As("clear_access_token")==="true"&&(Hi.removeItem("base44_access_token"),Hi.removeItem("token")),{appId:As("app_id",{defaultValue:"6a7af4ea8107c993162e6e54"}),token:As("access_token",{removeFromUrl:!0}),fromUrl:As("from_url",{defaultValue:window.location.href}),functionsVersion:As("functions_version",{defaultValue:"prod"}),appBaseUrl:As("app_base_url",{defaultValue:void 0})}),Vi={...lC()},{appId:uC,token:cC,functionsVersion:dC,appBaseUrl:fC}=Vi,qi=iC({appId:uC,token:cC,functionsVersion:dC,serverUrl:"",requiresAuth:!1,appBaseUrl:fC});function pC({}){var a;const t=os().pathname.substring(1),{data:s,isFetched:i}=pb({queryKey:["user"],queryFn:async()=>{try{return{user:await qi.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return m.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:m.jsx("div",{className:"max-w-md w-full",children:m.jsxs("div",{className:"text-center space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),m.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),m.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",m.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),i&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&m.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:m.jsxs("div",{className:"flex items-start space-x-3",children:[m.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:m.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),m.jsxs("div",{className:"text-left space-y-1",children:[m.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),m.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),m.jsx("div",{className:"pt-6",children:m.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[m.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const mv=S.createContext(),hC=({children:n})=>{const[t,s]=S.useState(null),[i,a]=S.useState(!1),[u,d]=S.useState(!0),[p,h]=S.useState(!0),[g,v]=S.useState(null),[x,_]=S.useState(!1),[j,M]=S.useState(null);S.useEffect(()=>{k()},[]);const k=async()=>{var N,A;try{h(!0),v(null);const $=zi({baseURL:"/api/apps/public",headers:{"X-App-Id":Vi.appId},token:Vi.token,interceptResponses:!0});try{const V=await $.get(`/prod/public-settings/by-id/${Vi.appId}`);M(V),Vi.token?await w():(d(!1),a(!1),_(!0)),h(!1)}catch(V){if(console.error("App state check failed:",V),V.status===403&&((A=(N=V.data)==null?void 0:N.extra_data)!=null&&A.reason)){const G=V.data.extra_data.reason;v(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:V.message})}else v({type:"unknown",message:V.message||"Failed to load app"});h(!1),d(!1)}}catch($){console.error("Unexpected error:",$),v({type:"unknown",message:$.message||"An unexpected error occurred"}),h(!1),d(!1)}},w=async()=>{try{d(!0);const N=await qi.auth.me();s(N),a(!0),d(!1),_(!0)}catch(N){console.error("User auth check failed:",N),d(!1),a(!1),_(!0),(N.status===401||N.status===403)&&v({type:"auth_required",message:"Authentication required"})}},E=(N=!0)=>{s(null),a(!1),N?qi.auth.logout(window.location.href):qi.auth.logout()},L=()=>{qi.auth.redirectToLogin(window.location.href)};return m.jsx(mv.Provider,{value:{user:t,isAuthenticated:i,isLoadingAuth:u,isLoadingPublicSettings:p,authError:g,appPublicSettings:j,authChecked:x,logout:E,navigateToLogin:L,checkUserAuth:w,checkAppState:k},children:n})},mC=()=>{const n=S.useContext(mv);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n},gC=()=>m.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:m.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:m.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),m.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),m.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),m.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[m.jsx("p",{children:"If you believe this is an error, you can:"}),m.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[m.jsx("li",{children:"Verify you are logged in with the correct account"}),m.jsx("li",{children:"Contact the app administrator for access"}),m.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),yC=n=>{const t=n.slice(1);try{return decodeURIComponent(t)}catch{return t}};function vC(){const{pathname:n,hash:t}=os(),s=qb();return S.useEffect(()=>{if(s!=="POP"){if(t){const i=yC(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(i))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[n,t,s]),null}const xC=[{label:"About",to:"/about/our-approach/"},{label:"Our Business",to:"/our-business/"},{label:"Investors",to:"/about/governance/"},{label:"Resources",to:"/our-business/overview/"},{label:"Contact",to:"/contact/"}];function wC(){const[n,t]=S.useState(!1),s=os();return S.useEffect(()=>{const i=()=>t(window.scrollY>24);return i(),window.addEventListener("scroll",i,{passive:!0}),()=>window.removeEventListener("scroll",i)},[]),m.jsx("header",{className:`fixed top-0 inset-x-0 z-50 transition-all duration-300 ${n?"bg-[#F1F0EC]/95 backdrop-blur-[2px] border-b border-black/10 h-[68px]":"bg-transparent border-b border-transparent h-[88px]"}`,children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 h-full flex items-center justify-between",children:[m.jsxs(Ft,{to:"/",className:"flex items-center gap-3 group","aria-label":"Alrazah Holding home",children:[m.jsx("span",{className:`inline-flex items-center justify-center w-9 h-9 border transition-colors ${n?"border-[#101820] text-[#101820]":"border-white/70 text-white"}`,children:m.jsx("span",{className:"text-[13px] font-semibold tracking-tight",children:"A"})}),m.jsx("span",{className:`text-[15px] font-semibold tracking-[0.18em] uppercase transition-colors ${n?"text-[#101820]":"text-white"}`,children:"Alrazah"})]}),m.jsx("nav",{className:"hidden lg:flex items-center gap-9",children:xC.map(i=>{const a=s.pathname.replace(/\/$/,"")===i.to.replace(/\/$/,"");return m.jsxs(Ft,{to:i.to,className:`text-[12px] font-medium uppercase tracking-[0.14em] transition-colors relative ${n?"text-[#172026] hover:text-[#7B1B2A]":"text-white/85 hover:text-white"} ${a?n?"text-[#7B1B2A]":"text-white":""}`,children:[i.label,a&&m.jsx("span",{className:`absolute -bottom-1.5 left-0 right-0 h-px ${n?"bg-[#7B1B2A]":"bg-white"}`})]},i.label)})}),m.jsx("div",{className:"hidden lg:flex items-center gap-4",children:m.jsx("span",{className:`text-[11px] uppercase tracking-[0.14em] ${n?"text-[#687078]":"text-white/70"}`,children:"Doha, Qatar"})}),m.jsx("button",{className:`lg:hidden text-[12px] uppercase tracking-[0.14em] ${n?"text-[#101820]":"text-white"}`,"aria-label":"Open menu",children:"Menu"})]})})}const bC=[{title:"Our Business",links:[{label:"Overview",to:"/our-business/overview/"},{label:"Real Estate",to:"/our-business/real-estate/"},{label:"Logistics & Industrial",to:"/our-business/logistics-industrial/"},{label:"Asset Management",to:"/our-business/asset-management/"},{label:"Project Management",to:"/our-business/project-management/"}]},{title:"About",links:[{label:"Our Approach",to:"/about/our-approach/"},{label:"Governance",to:"/about/governance/"},{label:"Investors",to:"/about/governance/"}]},{title:"Resources",links:[{label:"Overview",to:"/our-business/overview/"},{label:"Contact",to:"/contact/"}]}];function EC(){return m.jsx("footer",{className:"bg-[#101820] text-white",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 pt-20 pb-10",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-8 pb-16 border-b border-white/12",children:[m.jsxs("div",{className:"lg:col-span-5",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"inline-flex items-center justify-center w-10 h-10 border border-white/60",children:m.jsx("span",{className:"text-[14px] font-semibold",children:"A"})}),m.jsx("span",{className:"text-[16px] font-semibold tracking-[0.2em] uppercase",children:"Alrazah Holding"})]}),m.jsx("p",{className:"mt-6 max-w-[420px] text-[15px] leading-[1.7] text-white/65",children:"An investment and development group managing capital, assets and complex development across Qatar and the wider GCC."}),m.jsx("p",{className:"mt-6 text-[11px] uppercase tracking-[0.14em] text-white/45",children:"Doha · State of Qatar"})]}),m.jsx("div",{className:"lg:col-span-7 grid grid-cols-2 sm:grid-cols-3 gap-8",children:bC.map(n=>m.jsxs("div",{children:[m.jsx("p",{className:"text-[11px] uppercase tracking-[0.14em] text-white/45 mb-5",children:n.title}),m.jsx("ul",{className:"space-y-3",children:n.links.map(t=>m.jsx("li",{children:m.jsx(Ft,{to:t.to,className:"text-[14px] text-white/80 hover:text-white transition-colors",children:t.label})},t.label))})]},n.title))})]}),m.jsxs("div",{className:"pt-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[m.jsxs("p",{className:"text-[11px] uppercase tracking-[0.14em] text-white/45",children:["© ",new Date().getFullYear()," Alrazah Holding. All rights reserved."]}),m.jsxs("div",{className:"flex items-center gap-6",children:[m.jsx(Ft,{to:"/about/governance/",className:"text-[11px] uppercase tracking-[0.14em] text-white/55 hover:text-white",children:"Privacy"}),m.jsx(Ft,{to:"/about/governance/",className:"text-[11px] uppercase tracking-[0.14em] text-white/55 hover:text-white",children:"Terms"}),m.jsx(Ft,{to:"/contact/",className:"text-[11px] uppercase tracking-[0.14em] text-white/55 hover:text-white",children:"Contact"})]})]})]})})}function SC(n){const[t,s]=S.useState(null);return S.useLayoutEffect(()=>{const i=n.current;if(!i)return;const a=i.getBoundingClientRect();s({width:a.width,height:a.height});const u=new ResizeObserver(([d])=>{const{width:p,height:h}=d.contentRect;s({width:p,height:h})});return u.observe(i),()=>u.disconnect()},[n]),t}const _C={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},kC=1024,Ln={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},CC=[1,2,3],RC=6e3;function NC(n){try{const t=new URL(n);if(t.protocol!=="https:"||t.username||t.password||t.port&&t.port!=="443")return null;const s=_C[t.hostname];if(!s)return null;const i=t.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),a=i?i[1]:t.pathname,u=a.split("/").pop();return!a.startsWith(s)||!u||!/\.[a-z0-9]+$/i.test(u)||/\.svg$/i.test(u)?null:{baseUrl:`${t.origin}${a}`,filename:u}}catch{return null}}const Vm=n=>Math.min(Math.max(Math.round(n),1),RC),qm=n=>Math.min(1,Math.max(0,n));function Hc({baseUrl:n,filename:t},{width:s,height:i,crop:a,focalPoint:u,quality:d}){const p=[`w_${Vm(s)}`,`h_${Vm(i||s)}`];a&&p.push(u?`fp_${qm(u.x).toFixed(2)}_${qm(u.y).toFixed(2)}`:"al_c"),p.push(`q_${d}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const h=/\.gif$/i.test(t)?t:t.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${n}/v1/${a?"fill":"fit"}/${p.join(",")}/${h}`}function TC(n,t){return CC.map(s=>`${Hc(n,{...t,width:t.width*s,height:t.height?t.height*s:void 0})} ${s}x`).join(", ")}function PC(n,t){return(t==null?void 0:t.baseUrl)||n}function OC(n){return n===Ln.OPTIMIZED?Ln.ORIGINAL:Ln.FALLBACK}const fc="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",gv=S.forwardRef(({aspectRatio:n,className:t,style:s,children:i},a)=>m.jsx("span",{ref:a,className:Er("inline-block relative",t),style:{aspectRatio:n,...s},children:i}));gv.displayName="ImageWrapper";const yv=S.forwardRef(({parsed:n,fittingType:t,focalPoint:s,quality:i,className:a,style:u,aspectRatio:d,onLoad:p,...h},g)=>{const v=S.useRef(null),x=S.useRef(null),_=SC(v),[j,M]=S.useState(!1);S.useImperativeHandle(g,()=>x.current),S.useEffect(()=>{M(!1)},[n.baseUrl]);const k=t!=="fit",w=_&&{width:_.width||kC,height:_.height?_.height:void 0,crop:k,focalPoint:k?s:void 0,quality:i};return m.jsxs(gv,{ref:v,aspectRatio:d,className:a,style:u,children:[w&&!j&&m.jsx("img",{src:Hc(n,{...w,width:20,height:w.height?Math.max(1,Math.round(20*w.height/w.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:t==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),w&&m.jsx("img",{ref:x,src:Hc(n,w),srcSet:TC(n,w),loading:"lazy",className:Er("w-full h-full inset-0 absolute",t==="fit"?"object-contain":"object-cover"),onLoad:E=>{M(!0),p==null||p(E)},...h})]})});yv.displayName="ResponsiveImage";const el=S.forwardRef(({src:n,fittingType:t="fill",originWidth:s,originHeight:i,focalPointX:a,focalPointY:u,quality:d=90,onError:p,...h},g)=>{const v=n&&n!==fc?NC(n):null,x=v?Ln.OPTIMIZED:Ln.ORIGINAL,[_,j]=S.useState({src:n,mode:x}),M=_.src===n?_.mode:x;S.useEffect(()=>{j({src:n,mode:x})},[n,x]);const w={...h,onError:A=>{if(M===Ln.FALLBACK)return;const $=OC(M);j({src:n,mode:$}),$===Ln.FALLBACK&&(p==null||p(A))}};if(!n)return m.jsx("img",{ref:g,src:fc,...w,"data-empty-image":!0});const E=M===Ln.OPTIMIZED?v:null;if(!E){const A=M===Ln.FALLBACK,$=A?fc:PC(n,v);return m.jsx("img",{ref:g,src:$,...w,"data-error-image":A||void 0})}const L=typeof a=="number"&&typeof u=="number"?{x:a,y:u}:void 0,N=s&&i?`${s} / ${i}`:void 0;return m.jsx(yv,{ref:g,parsed:E,fittingType:t,focalPoint:L,quality:d,aspectRatio:N,...w})});el.displayName="Image";function AC({theme:n="dark"}){const t=n==="dark"?"text-white/55":"text-[#687078]",s=n==="dark"?"text-white":"text-[#172026]",i=n==="dark"?"text-white/30":"text-[#687078]/60";return m.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex items-center gap-2 text-[11px] uppercase tracking-[0.14em]",children:[m.jsx(Ft,{to:"/",className:`${t} hover:${s} transition-colors`,children:"Home"}),m.jsx("span",{className:i,children:"/"}),m.jsx(Ft,{to:"/our-business/",className:`${t} hover:${s} transition-colors`,children:"Our Business"}),m.jsx("span",{className:i,children:"/"}),m.jsx("span",{className:s,children:"Project Management"})]})}const jC="https://media.base44.com/images/public/6a7af4ea8107c993162e6e54/9abf91fe9_generated_fabe972d.png";function LC(){return m.jsxs("section",{className:"relative min-h-[680px] lg:min-h-[100vh] w-full overflow-hidden bg-[#101820]",children:[m.jsx(el,{src:jC,alt:"Elevated view of Doha's West Bay skyline at dusk",fittingType:"fill",focalPointX:.5,focalPointY:.45,className:"absolute inset-0 w-full h-full block"}),m.jsx("div",{className:"absolute inset-0",style:{background:"rgba(10,18,24,0.55)"}}),m.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:"linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px)",backgroundSize:"8.333% 100%"}}),m.jsxs("div",{className:"relative z-10 mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 h-full flex flex-col",children:[m.jsx("div",{className:"pt-[112px] lg:pt-[120px]",children:m.jsx(AC,{theme:"dark"})}),m.jsxs("div",{className:"flex-1 flex flex-col justify-center max-w-[860px] py-16",children:[m.jsx("p",{className:"alrazah-eyebrow text-white/70 mb-6",children:"Our Business"}),m.jsx("h1",{className:"text-white font-medium tracking-[-0.02em] leading-[1.02] text-balance text-[44px] sm:text-[56px] lg:text-[78px]",children:"Execution discipline behind complex development."}),m.jsx("p",{className:"mt-8 max-w-[620px] text-[17px] lg:text-[18px] leading-[1.7] text-white/75",children:"Alrazah's project management capability brings strategic oversight, development expertise and disciplined execution together to deliver projects with greater control over cost, time, quality and long-term performance."}),m.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row gap-4",children:[m.jsx("a",{href:"#approach",className:"inline-flex items-center justify-center gap-2 px-7 h-12 bg-white text-[#101820] text-[12px] font-medium uppercase tracking-[0.14em] hover:bg-[#F1F0EC] transition-colors",children:"Explore Our Approach"}),m.jsx(Ft,{to:"/contact/",className:"inline-flex items-center justify-center gap-2 px-7 h-12 border border-white/40 text-white text-[12px] font-medium uppercase tracking-[0.14em] hover:border-white hover:bg-white/5 transition-colors",children:"Contact Alrazah"})]})]}),m.jsxs("div",{className:"pb-10 border-t border-white/15 pt-6 flex items-end justify-between",children:[m.jsx("div",{children:m.jsx("p",{className:"text-[11px] uppercase tracking-[0.14em] text-white/55",children:"Project Management"})}),m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("span",{className:"text-[11px] uppercase tracking-[0.14em] text-white/55",children:"01 / Project Management"}),m.jsx("span",{className:"w-10 h-px bg-[#7B1B2A]"})]})]})]})]})}function Re({children:n,as:t="div",className:s="",delay:i=0,...a}){const u=S.useRef(null),[d,p]=S.useState(!1);return S.useEffect(()=>{const h=u.current;if(!h)return;const g=new IntersectionObserver(v=>{v.forEach(x=>{x.isIntersecting&&(p(!0),g.unobserve(x.target))})},{threshold:.12,rootMargin:"0px 0px -8% 0px"});return g.observe(h),()=>g.disconnect()},[]),m.jsx(t,{ref:u,className:`${d?"reveal-in":"reveal-init"} ${s}`,style:{transitionDelay:`${i}ms`},...a,children:n})}const IC=[{n:"01",title:"Strategic Oversight",body:"Investment objectives remain visible throughout delivery."},{n:"02",title:"Execution Control",body:"Cost, programme, quality and risk are monitored systematically."},{n:"03",title:"Asset Readiness",body:"Projects are developed with their eventual operational performance in view."}];function DC(){return m.jsx("section",{id:"approach",className:"bg-[#F1F0EC]",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Project Delivery Capability"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"From investment intent to delivered asset."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsxs(Re,{delay:80,children:[m.jsx("p",{className:"text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Successful development requires more than capital and a sound concept. It requires disciplined coordination across every stage of execution. Alrazah applies an investment-led perspective to project management, aligning strategic objectives with planning, technical coordination, procurement, construction oversight and delivery controls."}),m.jsx("p",{className:"mt-6 text-[#687078] text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Our approach is designed to maintain visibility across the project lifecycle while protecting the commercial objectives established at the outset. By integrating project oversight with Alrazah's broader investment and development capabilities, we seek to create greater certainty around execution and long-term asset performance."})]})})]}),m.jsx("div",{className:"mt-16 lg:mt-24 grid grid-cols-1 md:grid-cols-3 border-t border-[#18232B]/12",children:IC.map((n,t)=>m.jsxs(Re,{delay:t*90,className:`px-6 md:px-8 py-10 border-b md:border-b-0 border-[#18232B]/12 ${t!==0?"md:border-l md:border-[#18232B]/12":""}`,children:[m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:n.n}),m.jsx("h3",{className:"mt-4 text-[#101820] text-[18px] font-medium uppercase tracking-[0.08em]",children:n.title}),m.jsx("p",{className:"mt-3 text-[#687078] text-[15px] leading-[1.65] max-w-[280px]",children:n.body})]},n.n))})]})})}const pc=["Strategy","Feasibility","Planning","Delivery","Commissioning","Asset Readiness"];function MC(){return m.jsx("section",{className:"bg-white",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-16 lg:mb-24",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Alrazah Delivery Model"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"A controlled path from strategy to completion."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Alrazah approaches project management as an integrated development discipline. Each stage is connected to the next, allowing commercial objectives, technical requirements and delivery considerations to remain aligned throughout the life of a project."})})})]}),m.jsxs(Re,{children:[m.jsx("div",{className:"hidden lg:flex items-stretch border-t border-b border-[#18232B]/15",children:pc.map((n,t)=>m.jsxs("div",{className:`flex-1 px-6 py-10 ${t!==0?"border-l border-[#18232B]/15":""}`,children:[m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:String(t+1).padStart(2,"0")}),m.jsx("p",{className:"mt-5 text-[#101820] text-[17px] font-medium uppercase tracking-[0.08em]",children:n}),tm.jsxs("div",{className:"flex items-center gap-5 py-7 border-b border-[#18232B]/15",children:[m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em] w-8",children:String(t+1).padStart(2,"0")}),m.jsx("div",{className:"flex-1",children:m.jsx("p",{className:"text-[#101820] text-[17px] font-medium uppercase tracking-[0.08em]",children:n})}),m.jsx("span",{className:"text-[#687078] text-[18px]",children:"↓"})]},n))})]})]})})}const FC="https://media.base44.com/images/public/6a7af4ea8107c993162e6e54/e6beff79a_generated_205719ee.png",BC=[{n:"01",title:"Strategic Definition",purpose:"Establish the investment rationale, project objectives and required outcomes.",items:["Strategic alignment","Investment objectives","Project scope","Stakeholder requirements","Development priorities"]},{n:"02",title:"Feasibility & Development Planning",purpose:"Test the project's commercial, technical and operational assumptions.",items:["Feasibility analysis","Development programme","Preliminary budgets","Site considerations","Regulatory requirements","Delivery strategy"]},{n:"03",title:"Design & Technical Coordination",purpose:"Translate project objectives into coordinated design and technical requirements.",items:["Design coordination","Engineering interfaces","Specifications","Authority coordination","Value engineering","Design review"]},{n:"04",title:"Procurement & Construction",purpose:"Maintain disciplined execution while physical development progresses.",items:["Procurement strategy","Contractor coordination","Programme monitoring","Quality assurance","Cost control","Site progress"]},{n:"05",title:"Commissioning & Handover",purpose:"Transition the completed project into an operationally ready asset.",items:["Testing","Commissioning","Documentation","Defect management","Handover","Operational readiness"]},{n:"06",title:"Performance & Asset Transition",purpose:"Ensure the completed project supports the original investment objectives.",items:["Operational performance","Asset readiness","Lifecycle considerations","Stakeholder transition","Post-completion review"]}];function UC(){return m.jsx("section",{className:"bg-white",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-16 lg:mb-20",children:[m.jsx("div",{className:"lg:col-span-6",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Project Lifecycle"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"Management begins before construction."})]})}),m.jsx("div",{className:"lg:col-span-6 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[560px]",children:"Effective project outcomes are established long before physical delivery begins. Alrazah's framework introduces project controls at the earliest stages, creating a structured basis for decisions as projects move from concept through execution and into operation."})})})]}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12",children:[m.jsx("div",{className:"lg:col-span-5 order-2 lg:order-1",children:m.jsx(Re,{children:m.jsxs("div",{className:"relative overflow-hidden border border-[#18232B]/15",children:[m.jsx(el,{src:FC,alt:"Architectural blueprints and a polished steel scale ruler on a dark stone desk",fittingType:"fill",className:"block w-full h-[260px] lg:h-[420px]"}),m.jsxs("div",{className:"p-6 border-t border-[#18232B]/15 bg-[#F1F0EC]",children:[m.jsx("p",{className:"text-[11px] uppercase tracking-[0.14em] text-[#687078]",children:"Lifecycle Discipline"}),m.jsx("p",{className:"mt-2 text-[#101820] text-[16px] leading-[1.6]",children:"Each stage is governed by defined controls before passing to the next."})]})]})})}),m.jsx("div",{className:"lg:col-span-7 order-1 lg:order-2",children:m.jsx("div",{className:"border-t border-[#18232B]/15",children:BC.map((n,t)=>m.jsx(Re,{delay:t*50,className:"border-b border-[#18232B]/15 py-8 lg:py-10",children:m.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-12 gap-6",children:[m.jsxs("div",{className:"sm:col-span-3",children:[m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:n.n}),m.jsx("h3",{className:"mt-3 text-[#101820] text-[18px] font-medium leading-[1.25]",children:n.title})]}),m.jsxs("div",{className:"sm:col-span-9",children:[m.jsxs("p",{className:"text-[#172026] text-[15px] leading-[1.6]",children:[m.jsx("span",{className:"text-[#687078] uppercase tracking-[0.1em] text-[11px] mr-2",children:"Purpose"}),n.purpose]}),m.jsx("ul",{className:"mt-4 flex flex-wrap gap-x-6 gap-y-2",children:n.items.map(s=>m.jsxs("li",{className:"text-[#687078] text-[13px] leading-[1.5] flex items-center gap-2",children:[m.jsx("span",{className:"w-1 h-1 bg-[#7B1B2A] inline-block"}),s]},s))})]})]})},n.n))})})]})]})})}const zC=[{n:"01",title:"Cost",body:"Maintaining visibility over budgets, commitments, variations and projected expenditure."},{n:"02",title:"Programme",body:"Establishing delivery milestones and monitoring progress against agreed schedules."},{n:"03",title:"Quality",body:"Applying defined standards and review mechanisms throughout design and construction."},{n:"04",title:"Risk",body:"Identifying material project risks early and maintaining structured mitigation strategies."},{n:"05",title:"Procurement",body:"Coordinating procurement decisions with programme, commercial and technical requirements."},{n:"06",title:"Stakeholders",body:"Maintaining alignment across investors, consultants, contractors, authorities and operating partners."}];function $C({d:n,i:t}){const[s,i]=S.useState(!1);return m.jsx("div",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),className:`group p-8 lg:p-10 border-[#18232B]/20 transition-colors duration-300 ${s?"bg-[#18232B]":"bg-transparent"} ${t<4?"border-b":""} ${t%3!==0?"lg:border-l":""} ${t%2!==0?"sm:border-l":""}`,children:m.jsxs("div",{className:"flex items-start gap-5",children:[m.jsx("p",{className:`text-[44px] lg:text-[56px] font-thin leading-none tracking-tight transition-transform duration-300 ${s?"-translate-y-1 text-white":"text-white/40"}`,children:n.n}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:`h-px mb-5 transition-all duration-300 ${s?"w-12 bg-[#7B1B2A]":"w-6 bg-white/30"}`}),m.jsx("h3",{className:"text-white text-[20px] font-medium uppercase tracking-[0.06em]",children:n.title}),m.jsx("p",{className:`mt-3 text-[15px] leading-[1.6] max-w-[320px] transition-colors duration-300 ${s?"text-white/80":"text-white/50"}`,children:n.body})]})]})})}function VC(){return m.jsx("section",{className:"bg-[#101820]",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-16 lg:mb-20",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Control Disciplines"}),m.jsx("h2",{className:"text-white font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"Control is built into the process."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-white/70 text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Complex projects require visibility across multiple variables at once. Alrazah's project management framework is structured around the disciplines that most directly influence project outcomes."})})})]}),m.jsx(Re,{children:m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 border-t border-l border-[#18232B]/20",children:zC.map((n,t)=>m.jsx($C,{d:n,i:t+1},n.n))})})]})})}const qC=[{n:"01",label:"Scope",body:"Project requirements and deliverables are defined and maintained against approved objectives."},{n:"02",label:"Cost",body:"Budgets, commitments and changes are monitored against the established commercial framework."},{n:"03",label:"Programme",body:"Milestones and critical dependencies are tracked to identify potential impacts before they become delivery issues."},{n:"04",label:"Quality",body:"Technical and construction outcomes are assessed against agreed specifications and performance expectations."}];function WC(){return m.jsx("section",{className:"bg-[#E6E4DE]",children:m.jsx("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-16",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Development Control"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"Visibility across the variables that matter."}),m.jsx("p",{className:"mt-8 text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[460px]",children:"Alrazah's role is not limited to monitoring progress. Project management is structured around maintaining a clear view of the factors that influence value, delivery and operational performance."})]})}),m.jsx("div",{className:"lg:col-span-7",children:m.jsx("div",{className:"border-t border-[#18232B]/15",children:qC.map((n,t)=>m.jsxs(Re,{delay:t*70,className:"grid grid-cols-12 gap-6 py-8 border-b border-[#18232B]/15",children:[m.jsx("div",{className:"col-span-2 sm:col-span-2",children:m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:n.n})}),m.jsxs("div",{className:"col-span-10 sm:col-span-10",children:[m.jsx("h3",{className:"text-[#101820] text-[20px] font-medium uppercase tracking-[0.06em]",children:n.label}),m.jsx("p",{className:"mt-2 text-[#687078] text-[15px] leading-[1.6] max-w-[520px]",children:n.body})]})]},n.n))})})]})})})}const HC=[{title:"Risk",sub:"Anticipate. Assess. Mitigate.",body:"Risks are identified across commercial, technical, programme, regulatory and operational dimensions, with appropriate mitigation measures incorporated into project planning and oversight."},{title:"Cost",sub:"Plan. Monitor. Control.",body:"Cost management begins with a defined commercial baseline and continues through procurement, commitments, variations and completion."},{title:"Time",sub:"Programme. Milestones. Accountability.",body:"Clear delivery milestones provide a common framework for coordinating stakeholders and identifying emerging programme pressures."}];function QC(){return m.jsx("section",{className:"bg-white",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-16 lg:mb-20",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Project Governance"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"Protecting the investment through disciplined execution."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Project performance is inseparable from investment performance. Alrazah therefore considers risk, cost and programme as interconnected management disciplines rather than isolated reporting categories."})})})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 border-t border-[#18232B]/15",children:HC.map((n,t)=>m.jsxs(Re,{delay:t*90,className:`px-6 md:px-8 py-10 border-b md:border-b-0 border-[#18232B]/15 ${t!==0?"md:border-l md:border-[#18232B]/15":""}`,children:[m.jsx("h3",{className:"text-[#101820] text-[22px] font-medium uppercase tracking-[0.06em]",children:n.title}),m.jsx("p",{className:"mt-3 text-[#7B1B2A] text-[12px] font-medium uppercase tracking-[0.12em]",children:n.sub}),m.jsx("p",{className:"mt-5 text-[#687078] text-[15px] leading-[1.65] max-w-[300px]",children:n.body})]},n.title))}),m.jsx(Re,{children:m.jsx("div",{className:"mt-16 lg:mt-20 bg-[#101820] px-8 lg:px-14 py-14 lg:py-16",children:m.jsx("p",{className:"text-white text-[22px] lg:text-[28px] font-medium leading-[1.4] tracking-[-0.01em] max-w-[920px] text-balance",children:"The objective is not simply to complete a project. It is to deliver the intended asset with disciplined control over the factors that determine its value."})})})]})})}const KC=["Commercial","Technical","Delivery","Operations"];function GC(){return m.jsx("section",{className:"bg-[#101820]",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-16 lg:mb-20",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Our Framework"}),m.jsx("h2",{className:"text-white font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"One management framework. Multiple development environments."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-white/70 text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Alrazah's project management capability is designed to operate across different asset classes and project conditions while maintaining a consistent management philosophy."})})})]}),m.jsx(Re,{children:m.jsxs("div",{className:"border-t border-white/15",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-6 py-12",children:[m.jsxs("div",{className:"lg:col-span-3",children:[m.jsx("p",{className:"text-white/45 text-[11px] uppercase tracking-[0.14em]",children:"Framework"}),m.jsx("p",{className:"mt-3 text-white text-[26px] font-medium uppercase tracking-[0.04em]",children:"Strategy"}),m.jsx("p",{className:"mt-3 text-white/55 text-[14px] leading-[1.6] max-w-[220px]",children:"The investment objective anchors every downstream discipline."})]}),m.jsx("div",{className:"lg:col-span-9 grid grid-cols-2 lg:grid-cols-4 gap-px bg-white/12",children:KC.map((n,t)=>m.jsxs("div",{className:"bg-[#101820] p-6 lg:p-8",children:[m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:String(t+1).padStart(2,"0")}),m.jsx("p",{className:"mt-4 text-white text-[18px] font-medium uppercase tracking-[0.06em]",children:n}),m.jsx("div",{className:"mt-6 h-px w-8 bg-white/30"})]},n))})]}),m.jsxs("div",{className:"border-t border-white/15 pt-8 flex items-center gap-4",children:[m.jsx("span",{className:"text-white/40 text-[18px]",children:"↓"}),m.jsx("p",{className:"text-white text-[15px] font-medium uppercase tracking-[0.12em]",children:"Investment Objective"}),m.jsx("span",{className:"flex-1 h-px bg-[#7B1B2A]"})]})]})})]})})}const XC=[{n:"01",title:"Real Estate",body:"Commercial, residential and mixed-use developments.",cta:"Explore Real Estate",to:"/our-business/real-estate/",img:"https://media.base44.com/images/public/6a7af4ea8107c993162e6e54/3610ce812_generated_bf9ff770.png",alt:"Contemporary commercial real estate development in Doha",flip:!1},{n:"02",title:"Logistics & Industrial",body:"Warehousing, distribution infrastructure and industrial environments.",cta:"Explore Logistics & Industrial",to:"/our-business/logistics-industrial/",img:"https://media.base44.com/images/public/6a7af4ea8107c993162e6e54/7dece38f4_generated_4292e016.png",alt:"Modern logistics and distribution hub in Qatar",flip:!0},{n:"03",title:"Development Initiatives",body:"Strategic projects requiring integrated planning and execution.",cta:"View Our Business",to:"/our-business/",img:"https://media.base44.com/images/public/6a7af4ea8107c993162e6e54/10538bf54_generated_2d2bd7b5.png",alt:"Major urban infrastructure development initiative in Qatar",flip:!1},{n:"04",title:"Asset Development",body:"Projects designed around long-term operational and investment performance.",cta:"Our Approach",to:"/about/our-approach/",img:"https://media.base44.com/images/public/6a7af4ea8107c993162e6e54/a56de31f2_generated_0f581c4a.png",alt:"Completed contemporary commercial asset in Doha at dusk",flip:!0}];function YC({p:n}){return m.jsx(Re,{className:"group border border-[#18232B]/15 bg-white overflow-hidden",children:m.jsxs("div",{className:`grid grid-cols-1 md:grid-cols-12 ${n.flip?"md:[direction:rtl]":""}`,children:[m.jsx("div",{className:`md:col-span-7 ${n.flip?"md:[direction:ltr]":""} relative overflow-hidden`,children:m.jsx(el,{src:n.img,alt:n.alt,fittingType:"fill",className:"block w-full h-[240px] md:h-[300px] transition-transform duration-500 group-hover:scale-[1.03]"})}),m.jsxs("div",{className:`md:col-span-5 ${n.flip?"md:[direction:ltr]":""} p-8 lg:p-10 flex flex-col justify-between`,children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:n.n}),m.jsx("h3",{className:"mt-4 text-[#101820] text-[24px] lg:text-[28px] font-medium uppercase tracking-[0.04em] leading-[1.15]",children:n.title}),m.jsx("p",{className:"mt-4 text-[#687078] text-[15px] leading-[1.6] max-w-[280px]",children:n.body})]}),m.jsxs(Ft,{to:n.to,className:"mt-8 inline-flex items-center gap-2 text-[#101820] text-[12px] font-medium uppercase tracking-[0.14em] hover:text-[#7B1B2A] transition-colors",children:[n.cta,m.jsx("span",{className:"transition-transform duration-300 group-hover:translate-x-1.5",children:"→"})]})]})]})})}function JC(){return m.jsx("section",{className:"bg-[#F1F0EC]",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-14 lg:mb-16",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Portfolio Application"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"Project management across the portfolio."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"The discipline is applicable wherever Alrazah's investments require coordinated development, physical delivery or asset transformation."})})})]}),m.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-8",children:XC.map(n=>m.jsx(YC,{p:n},n.n))})]})})}const Wm=[{k:"Scope",v:"Controlled"},{k:"Programme",v:"Monitored"},{k:"Cost",v:"Controlled"},{k:"Risk",v:"Active Review"},{k:"Quality",v:"Assured"},{k:"Stakeholders",v:"Coordinated"}];function ZC(){return m.jsx("section",{className:"bg-white",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-16 lg:mb-20",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Performance Management"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"Decisions informed by project intelligence."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Effective project oversight depends on reliable information. Alrazah's management approach emphasizes structured reporting and visibility across project status, cost, programme, risk and delivery milestones."})})})]}),m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12",children:[m.jsx("div",{className:"lg:col-span-7",children:m.jsx(Re,{children:m.jsxs("div",{className:"border border-[#18232B]/15 bg-[#F1F0EC]",children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[#18232B]/15",children:[m.jsx("p",{className:"text-[11px] uppercase tracking-[0.14em] text-[#687078]",children:"Project Status"}),m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-1.5 h-1.5 bg-[#7B1B2A] inline-block animate-pulse"}),m.jsx("span",{className:"text-[11px] uppercase tracking-[0.14em] text-[#687078]",children:"Live View"})]})]}),m.jsx("div",{children:Wm.map((n,t)=>m.jsxs("div",{className:`grid grid-cols-12 items-center px-6 py-5 ${t!==Wm.length-1?"border-b border-[#18232B]/12":""}`,children:[m.jsx("p",{className:"col-span-6 text-[#172026] text-[15px] font-medium uppercase tracking-[0.08em]",children:n.k}),m.jsxs("div",{className:"col-span-6 flex items-center justify-end gap-3",children:[m.jsx("span",{className:"w-1.5 h-1.5 bg-[#7B1B2A] inline-block"}),m.jsx("p",{className:"text-[#101820] text-[15px] font-medium tracking-[0.04em]",children:n.v})]})]},n.k))})]})})}),m.jsx("div",{className:"lg:col-span-5 lg:pt-2",children:m.jsxs(Re,{delay:120,children:[m.jsx("p",{className:"text-[#687078] text-[11px] uppercase tracking-[0.14em] mb-4",children:"Reporting Discipline"}),m.jsx("p",{className:"text-[#172026] text-[17px] leading-[1.7]",children:"Status is reported qualitatively against defined control categories — not through fabricated completion metrics. The objective is reliable visibility, not performance theatre."}),m.jsx("div",{className:"mt-8 grid grid-cols-2 gap-px bg-[#18232B]/12 border border-[#18232B]/12",children:[{k:"Cadence",v:"Regular"},{k:"Basis",v:"Verified"},{k:"Scope",v:"Full Lifecycle"},{k:"Audience",v:"Stakeholders"}].map(n=>m.jsxs("div",{className:"bg-white p-5",children:[m.jsx("p",{className:"text-[#687078] text-[11px] uppercase tracking-[0.14em]",children:n.k}),m.jsx("p",{className:"mt-2 text-[#101820] text-[15px] font-medium",children:n.v})]},n.k))})]})})]})]})})}const Hm=[{stakeholder:"Investment Stakeholders",focus:"Strategic objectives and commercial outcomes"},{stakeholder:"Consultants",focus:"Design, engineering and technical coordination"},{stakeholder:"Contractors",focus:"Programme, quality and execution"},{stakeholder:"Authorities",focus:"Regulatory and statutory requirements"},{stakeholder:"Operators",focus:"Operational requirements and asset readiness"},{stakeholder:"Partners",focus:"Commercial alignment and project interfaces"}];function eR(){return m.jsx("section",{className:"bg-[#E6E4DE]",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-32",children:[m.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12 mb-14 lg:mb-16",children:[m.jsx("div",{className:"lg:col-span-5",children:m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Stakeholder Management"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.05] text-[34px] sm:text-[42px] lg:text-[52px] text-balance",children:"Alignment across the project ecosystem."})]})}),m.jsx("div",{className:"lg:col-span-7 lg:pt-3",children:m.jsx(Re,{delay:80,children:m.jsx("p",{className:"text-[#172026] text-[17px] lg:text-[18px] leading-[1.7] max-w-[620px]",children:"Large-scale development depends on coordination between multiple parties. Alrazah's project management framework is structured to maintain alignment between investment stakeholders, consultants, contractors, authorities, operators and other project participants."})})})]}),m.jsx(Re,{children:m.jsxs("div",{className:"border-t border-[#18232B]/20",children:[m.jsxs("div",{className:"hidden md:grid grid-cols-12 px-2 py-4 border-b border-[#18232B]/20",children:[m.jsx("p",{className:"col-span-5 text-[11px] uppercase tracking-[0.14em] text-[#687078]",children:"Stakeholder"}),m.jsx("p",{className:"col-span-7 text-[11px] uppercase tracking-[0.14em] text-[#687078]",children:"Management Focus"})]}),Hm.map((n,t)=>m.jsxs("div",{className:`grid grid-cols-1 md:grid-cols-12 px-2 py-6 md:py-7 ${t!==Hm.length-1?"border-b border-[#18232B]/20":""}`,children:[m.jsxs("div",{className:"md:col-span-5 flex items-center gap-4",children:[m.jsx("span",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:String(t+1).padStart(2,"0")}),m.jsx("p",{className:"text-[#101820] text-[17px] font-medium uppercase tracking-[0.06em]",children:n.stakeholder})]}),m.jsx("p",{className:"md:col-span-7 text-[#687078] text-[15px] leading-[1.6] md:pl-4 mt-2 md:mt-0",children:n.focus})]},n.stakeholder))]})})]})})}function tR(){return m.jsx("section",{className:"bg-[#101820]",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-24 lg:py-40",children:[m.jsxs(Re,{children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-8",children:"Why Project Management Matters"}),m.jsx("h2",{className:"text-white font-medium tracking-[-0.02em] leading-[1.04] text-[36px] sm:text-[48px] lg:text-[64px] max-w-[1000px] text-balance",children:"The quality of execution determines the quality of the asset."})]}),m.jsx("div",{className:"mt-12 lg:mt-16 grid grid-cols-1 lg:grid-cols-12 gap-10 lg:gap-12",children:m.jsx("div",{className:"lg:col-span-6 lg:col-start-6",children:m.jsxs(Re,{delay:100,children:[m.jsx("p",{className:"text-white/75 text-[17px] lg:text-[18px] leading-[1.7]",children:"For an investment and development group, project management is ultimately a value-protection discipline. Strong execution reduces avoidable uncertainty, improves visibility and creates a stronger foundation for the long-term performance of the assets Alrazah develops and invests in."}),m.jsx("p",{className:"mt-6 text-white/55 text-[17px] lg:text-[18px] leading-[1.7]",children:"By combining strategic oversight with disciplined project controls, Alrazah seeks to ensure that development decisions remain connected to the commercial and operational objectives that informed them."})]})})})]})})}const nR=[{a:"Investment-Led",b:"Project Oversight"},{a:"Integrated",b:"Development Capability"},{a:"Disciplined",b:"Delivery Controls"},{a:"Long-Term",b:"Asset Perspective"}];function rR(){return m.jsx("section",{className:"bg-[#F1F0EC] border-y border-[#18232B]/12",children:m.jsx("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-10 lg:py-12",children:m.jsx(Re,{children:m.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-y-8 gap-x-6",children:nR.map(n=>m.jsxs("div",{className:"flex flex-col",children:[m.jsx("p",{className:"text-[#101820] text-[13px] font-medium uppercase tracking-[0.14em]",children:n.a}),m.jsx("p",{className:"mt-1 text-[#687078] text-[13px] uppercase tracking-[0.14em]",children:n.b})]},n.a))})})})})}function sR(){return m.jsx("section",{className:"bg-[#F1F0EC]",children:m.jsx("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-20 lg:py-28",children:m.jsx(Re,{children:m.jsxs("div",{className:"max-w-[760px] mx-auto text-center",children:[m.jsx("p",{className:"alrazah-eyebrow text-[#7B1B2A] mb-6",children:"Connect With Alrazah"}),m.jsx("h2",{className:"text-[#101820] font-medium tracking-[-0.02em] leading-[1.08] text-[32px] sm:text-[40px] lg:text-[48px] text-balance",children:"Discuss a development opportunity."}),m.jsx("p",{className:"mt-6 text-[#687078] text-[17px] lg:text-[18px] leading-[1.7] max-w-[600px] mx-auto",children:"For investment opportunities, development partnerships or enquiries relating to Alrazah's project capabilities, our team welcomes the opportunity to understand your requirements."}),m.jsxs("div",{className:"mt-10 flex flex-col sm:flex-row justify-center gap-4",children:[m.jsx(Ft,{to:"/contact/",className:"inline-flex items-center justify-center px-8 h-12 bg-[#101820] text-white text-[12px] font-medium uppercase tracking-[0.14em] hover:bg-[#18232B] transition-colors",children:"Contact Alrazah"}),m.jsx(Ft,{to:"/our-business/",className:"inline-flex items-center justify-center px-8 h-12 border border-[#101820]/30 text-[#101820] text-[12px] font-medium uppercase tracking-[0.14em] hover:border-[#101820] transition-colors",children:"Explore Our Business"})]})]})})})})}const Qm=[{n:"01",title:"Real Estate",body:"Explore Alrazah's real estate investment and development activities.",cta:"View Real Estate",to:"/our-business/real-estate/"},{n:"02",title:"Logistics & Industrial",body:"Discover Alrazah's logistics and industrial development platform.",cta:"View Logistics & Industrial",to:"/our-business/logistics-industrial/"},{n:"03",title:"Asset Management",body:"Understand how Alrazah manages and develops its investment portfolio.",cta:"View Asset Management",to:"/our-business/asset-management/"}];function iR(){return m.jsx("section",{className:"bg-white border-t border-[#18232B]/12",children:m.jsxs("div",{className:"mx-auto max-w-[1280px] px-5 sm:px-8 lg:px-20 py-16 lg:py-24",children:[m.jsx(Re,{children:m.jsx("p",{className:"text-[11px] uppercase tracking-[0.14em] text-[#687078] mb-10",children:"Explore Our Business"})}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 border-t border-[#18232B]/15",children:Qm.map((n,t)=>m.jsxs(Re,{delay:t*80,className:`py-8 lg:py-10 ${t!==0?"md:border-l md:border-[#18232B]/15 md:pl-8":""} ${t!==Qm.length-1?"md:pr-8":""}`,children:[m.jsx("p",{className:"text-[#7B1B2A] text-[13px] font-medium tracking-[0.14em]",children:n.n}),m.jsx("h3",{className:"mt-4 text-[#101820] text-[22px] font-medium uppercase tracking-[0.04em]",children:n.title}),m.jsx("p",{className:"mt-3 text-[#687078] text-[15px] leading-[1.6] max-w-[300px]",children:n.body}),m.jsxs(Ft,{to:n.to,className:"mt-6 inline-flex items-center gap-2 text-[#101820] text-[12px] font-medium uppercase tracking-[0.14em] hover:text-[#7B1B2A] transition-colors group",children:[n.cta,m.jsx("span",{className:"transition-transform duration-300 group-hover:translate-x-1.5",children:"→"})]})]},n.n))})]})})}function Km(){return m.jsxs("div",{className:"bg-white",children:[m.jsx(wC,{}),m.jsxs("main",{children:[m.jsx(LC,{}),m.jsx(DC,{}),m.jsx(MC,{}),m.jsx(UC,{}),m.jsx(VC,{}),m.jsx(WC,{}),m.jsx(QC,{}),m.jsx(GC,{}),m.jsx(JC,{}),m.jsx(ZC,{}),m.jsx(eR,{}),m.jsx(tR,{}),m.jsx(rR,{}),m.jsx(sR,{}),m.jsx(iR,{})]}),m.jsx(EC,{})]})}const oR=()=>{const{isLoadingAuth:n,isLoadingPublicSettings:t,authError:s,navigateToLogin:i}=mC();if(t||n)return m.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:m.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return m.jsx(gC,{});if(s.type==="auth_required")return i(),null}return m.jsxs(lE,{children:[m.jsx(La,{path:"/our-business/project-management",element:m.jsx(Km,{})}),m.jsx(La,{path:"/our-business/project-management/",element:m.jsx(Km,{})}),m.jsx(La,{path:"*",element:m.jsx(pC,{})})]})};function aR(){return m.jsx(hC,{children:m.jsxs(tb,{client:hb,children:[m.jsxs(mE,{children:[m.jsx(vC,{}),m.jsx(oR,{})]}),m.jsx(T1,{})]})})}kx.createRoot(document.getElementById("root")).render(m.jsx(aR,{}));